Skip to content

Commit

Permalink
Test 27 6 wip (#4582)
Browse files Browse the repository at this point in the history
* Update addresses and public keys

* Add more info to double staking protection's panic message

* fmt

* update version and genesis

* Update version and CI

* Update Cargo.lock

* add community charter

* Add serde json tests (#4579)

* chore: typo fix (#4589)

* Update to wasmer 4.2.4 (#4581)

Co-authored-by: sydhds <[email protected]>

* typo fix

* typo fix

* typo fix

* typo fix

* typo fix

---------

Co-authored-by: Sydhds <[email protected]>
Co-authored-by: sydhds <[email protected]>

* ci: add checksum + tested with ACT (#4590)

* Upgrade-to-latest-toolchain (#4585)

Co-authored-by: Leo-Besancon <[email protected]>

* Update massa-sc-runtime

Signed-off-by: Jean-François <[email protected]>

* Cargo update

* Remove compatibility layer in tracing (#4535)

* Add deferred_credits initial file for test

* Update Genesis and CI

* Push back Genesis

* Same

---------

Signed-off-by: Jean-François <[email protected]>
Co-authored-by: Damir Vodenicarevic <[email protected]>
Co-authored-by: Moncef AOUDIA <[email protected]>
Co-authored-by: Ursulafe <[email protected]>
Co-authored-by: Sydhds <[email protected]>
Co-authored-by: sydhds <[email protected]>
Co-authored-by: Jean-François <[email protected]>
7 people authored Dec 15, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 29f6e6d commit 1425b01
Showing 90 changed files with 63,187 additions and 61,772 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.74.0
toolchain: 1.74.1
target: ${{ matrix.target }}
override: true
- uses: Swatinem/rust-cache@v2
@@ -92,7 +92,18 @@ jobs:
tar czvf massa_${GITHUB_REF/refs\/tags\//}_${{ matrix.name }} massa
fi
cd -
- name: Generate checksum
uses: jmgilman/actions-generate-checksum@v1
with:
method: sha256
patterns: |
massa_*.zip
massa_*.tar.gz
output: checksums_${{ matrix.name }}.txt
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: 'massa_*'
files: |
massa_*.zip
massa_*.tar.gz
checksums_*.txt
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.74.0
toolchain: 1.74.1
components: rustfmt
override: true
- uses: Swatinem/rust-cache@v2
@@ -55,7 +55,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.74.0
toolchain: 1.74.1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "check"
@@ -80,7 +80,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.74.0
toolchain: 1.74.1
components: clippy
override: true
- uses: Swatinem/rust-cache@v2
@@ -189,7 +189,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.74.0
toolchain: 1.74.1
override: true
- uses: Swatinem/rust-cache@v2
with:
@@ -206,7 +206,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: nextest
args: run --retries 10 --profile ci
args: run --retries 10 --profile ci
- uses: actions-rs/cargo@v1
with:
command: clean
@@ -236,7 +236,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.74.0
toolchain: 1.74.1
components: rustfmt
override: true
- uses: actions/checkout@v3
@@ -271,7 +271,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.74.0
toolchain: 1.74.1
components: rustfmt
override: true
- uses: Swatinem/rust-cache@v2
55 changes: 55 additions & 0 deletions COMMUNITY_CHARTER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Massa Community Charter

Code for open collaboration & truly decentralized blockchain

This is the “social” contract that all members of the Massa community are committed to read and to follow (hereinafter the “Charter”). By member we mean anyone who owns Massa tokens, who hosts a node, or who creates blocks on the Massa blockchain (hereinafter a “Member”).

This Charter aims to reflect the values of openness, transparency, decentralization, and the prohibition of delegation that are intrinsic to the community. By signing this Charter, any individual, institution, or social group of any kind commits to fulfill the principles established below.

## Decentralization

In order to preserve the fully decentralized character of the blockchain, the members undertake to make direct use of their Massa and more specifically not to delegate or transmit the management of their Massa to other members for staking; or to take on such delegation or management to stake on their behalf (as described in ###Prohibition on delegation by any means). Such a prohibition is effective when the amount of tokens transmitted or delegated is greater than or equal to 1,000,000 MAS tokens.


Thus, any Member commits themselves not to act within the Massa community as professional delegates (person or entity whose economic activity, whether principal or accessory, is to receive coins from other members to stake them on their behalf). For the avoidance of doubt, listing Massa on an exchange platform is allowed and other exchange platform activities (receive, manage and trade cryptocurrencies between blockchain networks) are allowed except staking.

## Prohibition of delegation by any means

As mentioned above (Decentralization section), the Massa ecosystem community recognizes that, for reasons of decentralization, delegating or transferring the management of tokens held by a given Member to another one constitutes an assumption of delegation contrary to the terms of this Charter. This includes, but is not limited to, delegation contrary to the provisions of the Charter:
Delegating tokens to a third party, whether professional or not, to stake or validate blocks on behalf of a given token holder;
Participating in a delegation pool.
Any violation of the prohibition of delegation is subject to sanctions, such as:
Suspension or exclusion of the given Member from the Massa community;
Legal action against the failing Member.
In any and all instances, any Member who feels aggrieved under the terms of the present provisions may request Massa Foundation's support, in particular for the purpose of taking legal action in the event that the defaulting Member's behavior is manifestly disproportionate and contrary to the present provisions.
In addition, any Member may also bring legal action with the support of any private entity they choose, such as a law firm. The provisions of this charter have full contractual value, allowing such an action to be brought in the event of a violation, whether the action is brought directly by the Foundation, by a community member with the support of the Foundation, or by a community member with the support of a private law firm.

## Accountability

The community recognizes everyone's right to be anonymous, however members' activities must be carried out in accordance with the charter to ensure that they do not undermine other members or even the decentralization of the Massa blockchain.

Massa members agree about what constitutes fair use of the platform, and are committed to not engaging in its misuse, whether explicitly or covertly. On a regular basis, and in case of doubt, the community may implement a number of measures to ensure compliance with these commitments. The community can also engage in all necessary actions in order to establish evidence of non-compliance in order to incur the liability of non-compliant persons.

## Transparency and integrity

The Massa network, and its current or future configuration, development, deployment and use must ensure and prioritize [1]transparency, [2]traceability and [3]integrity within the community at all times.

* [1]Transparency is a necessary condition for monitoring participatory processes and mechanisms, but will never, in any case, be applied to the processing of personal data or in violation of the privacy of Massa participants.

* [2]Traceability refers to the ability to fully account for what happens in any participatory or decision-making process related to the Massa community in the past and, to guarantee similar conditions for present and future ones. Each member acts on his or her own behalf or undertakes to make his or her position clear when acting on behalf of another Massa user or member.

* [3]Integrity is understood as the authenticity of a specific vote, or decision process, in order to avoid manipulation of proposals or results of participatory processes or mechanisms.

## Continuous improvement and governance

The Charter will be accessible on the blockchain at charter.massa. The community will be responsible for updating the present Charter in light of its collective needs and on the basis of a majority vote of the stakers, once the governance framework has been implemented. It suggests shared governance procedures based on Massa and a non-centralized decision-making process. Mechanisms for periodic review and evaluation of this Charter will be provided in order to facilitate its continuous improvement.

Every Member of the Massa community is responsible for the application of this Charter.

## Massa protocol license

In addition to the rights set forth in the Open Source license(s) included in the distribution for this software, data, and/or documentation (collectively the "Software," and such licenses collectively with this additional terms the "Software License"), the copyright holders wish to facilitate interoperability and regulate such data exchange with other software (including constants, function signatures, data structures and other invocation methods used to run or interact with each of them).

The implementation of the Massa protocol is conditional to the acceptance of and compliance with the Massa Charter available at charter.massa (the "Charter"). The mere use of any software implementing the Massa protocol makes you a Member of the Massa community and requires the reading and acceptance of the Charter. You must therefore accept the terms of the Charter and undertake to ensure that other members of the community respect them as well.

Failure to comply with these terms may result in legal action, as specified in the present provisions.
582 changes: 324 additions & 258 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -105,8 +105,8 @@ massa_versioning = { path = "./massa-versioning" }
massa_wallet = { path = "./massa-wallet" }

# Massa projects dependencies
massa-proto-rs = { git = "https://github.com/massalabs/massa-proto-rs", "rev" = "effc0418977cd64402172b7eb749a2fc7537771a" }
massa-sc-runtime = { git = "https://github.com/massalabs/massa-sc-runtime", "rev" = "0964888658c24060b4b553cb52ed8ba5365eca01" }
massa-proto-rs = { git = "https://github.com/massalabs/massa-proto-rs", "rev" = "30b91d705b704287662b0e42457ece442005fa46" }
massa-sc-runtime = { git = "https://github.com/massalabs/massa-sc-runtime", "rev" = "0bef3a9c0013e61b0c2b18105238649ac74007c9" }
peernet = { git = "https://github.com/massalabs/PeerNet", "branch" = "main" }

# Common dependencies
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -66,4 +66,9 @@ server. If you're comfortable enough to get started on you're own, check out our

### Contributors

A list of all the contributors can be found [here](CONTRIBUTORS.md)
A list of all the contributors can be found [here](CONTRIBUTORS.md)

### Community Charter

The Massa Community Charter is designed to protect decentralization.
You can find it here: [COMMUNITY_CHARTER.md](COMMUNITY_CHARTER.md)
123,691 changes: 62,312 additions & 61,379 deletions lcov.info

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion massa-api-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_api_exports"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

9 changes: 4 additions & 5 deletions massa-api-exports/src/operation.rs
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ mod tests {
#[test]
#[serial]
fn test_execute_sc_with_datastore() {
let given_op = OperationType::ExecuteSC {
let expected_op = OperationType::ExecuteSC {
max_gas: 123,
max_coins: Amount::from_str("5000000").unwrap(),
data: vec![23u8, 123u8, 44u8],
@@ -87,8 +87,7 @@ mod tests {
]),
};

let op_json_str = serde_json::to_string(&given_op).unwrap();

let op_json_str = serde_json::to_string(&expected_op).unwrap();
let op_json_value: Value = serde_json::from_str(&op_json_str).unwrap();
let datastore = op_json_value["ExecuteSC"]
.as_object()
@@ -105,7 +104,7 @@ mod tests {
assert_eq!(first_key.len(), 3);
assert_eq!(first_value.len(), 6);

let expected_op = serde_json::from_str(&op_json_str).unwrap();
assert_eq!(given_op, expected_op);
let actual_op: OperationType = serde_json::from_str(&op_json_str).unwrap();
assert_eq!(actual_op, expected_op);
}
}
2 changes: 1 addition & 1 deletion massa-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_api"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[features]
2 changes: 1 addition & 1 deletion massa-async-pool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_async_pool"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_bootstrap"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-channel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_channel"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[features]
2 changes: 1 addition & 1 deletion massa-cipher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_cipher"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[dependencies]
2 changes: 1 addition & 1 deletion massa-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa-client"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[dependencies]
2 changes: 1 addition & 1 deletion massa-consensus-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_consensus_exports"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-consensus-worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_consensus_worker"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-consensus-worker/src/controller.rs
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ use massa_models::{
use massa_storage::Storage;
use parking_lot::RwLock;
use std::sync::Arc;
use tracing::log::{debug, trace, warn};
use tracing::{debug, trace, warn};

use crate::{commands::ConsensusCommand, state::ConsensusState};

2 changes: 1 addition & 1 deletion massa-consensus-worker/src/manager.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use massa_channel::sender::MassaSender;
use massa_consensus_exports::ConsensusManager;
use std::thread::JoinHandle;
use tracing::log::info;
use tracing::info;

use crate::commands::ConsensusCommand;

2 changes: 1 addition & 1 deletion massa-consensus-worker/src/state/process.rs
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ use massa_models::{
use massa_signature::PublicKey;
use massa_storage::Storage;
use massa_time::MassaTime;
use tracing::log::{debug, info};
use tracing::{debug, info};

use crate::state::{
clique_computation::compute_max_cliques,
2 changes: 1 addition & 1 deletion massa-consensus-worker/src/state/stats.rs
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ use massa_time::MassaTime;
use std::cmp::max;

#[cfg(not(feature = "sandbox"))]
use tracing::log::warn;
use tracing::warn;

#[cfg(not(feature = "sandbox"))]
use massa_consensus_exports::events::ConsensusEvent;
2 changes: 1 addition & 1 deletion massa-consensus-worker/src/worker/init.rs
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ use std::{
collections::{HashMap, VecDeque},
sync::Arc,
};
use tracing::log::info;
use tracing::info;

use crate::{commands::ConsensusCommand, state::ConsensusState};

2 changes: 1 addition & 1 deletion massa-consensus-worker/src/worker/main_loop.rs
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ use massa_models::{
timeslots::{get_block_slot_timestamp, get_closest_slot_to_timestamp},
};
use massa_time::MassaTime;
use tracing::log::{info, warn};
use tracing::{info, warn};

use crate::commands::ConsensusCommand;

2 changes: 1 addition & 1 deletion massa-db-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_db_exports"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[features]
2 changes: 1 addition & 1 deletion massa-db-worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_db_worker"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[features]
2 changes: 1 addition & 1 deletion massa-executed-ops/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_executed_ops"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-execution-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_execution_exports"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-execution-worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ harness = false

[package]
name = "massa_execution_worker"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

5 changes: 4 additions & 1 deletion massa-execution-worker/src/execution.rs
Original file line number Diff line number Diff line change
@@ -624,7 +624,10 @@ impl ExecutionState {
.get_wallet_address_list()
.contains(&addr_denounced)
{
panic!("You are being slashed at slot {} for double-staking using address {}. The node is stopping to prevent any further loss", block_slot, addr_denounced);
match &denunciation.is_for_block_header() {
true => panic!("You are being slashed at slot {} for double-staking using address {}. The node is stopping to prevent any further loss. Block header denunciation of block at slot {:?}. Denunciation's public key: {:?}", block_slot, addr_denounced, denunciation.get_slot(), denunciation.get_public_key()),
false => panic!("You are being slashed at slot {} for double-staking using address {}. The node is stopping to prevent any further loss. Endorsement denunciation of endorsement at slot {:?} and index {:?}. Denunciation's public key: {:?}", block_slot, addr_denounced, denunciation.get_slot(), denunciation.get_index(), denunciation.get_public_key())
}
}

Ok(())
2 changes: 1 addition & 1 deletion massa-execution-worker/src/tests/scenarios_mandatories.rs
Original file line number Diff line number Diff line change
@@ -980,7 +980,7 @@ fn local_execution() {
/// Functional test for sc deployment utility functions, `functionExists` and `callerHasWriteAccess`
///
/// 1. a block is created with one ExecuteSC operation containing
/// a deployment sc as bytecode to execute and a deplyed sc as an op datatsore entry
/// a deployment sc as bytecode to execute and a deployed sc as an op datatsore entry
/// 2. store and set the block as final
/// 3. wait for execution
/// 4. retrieve events emitted by the initial an sub functions
2 changes: 1 addition & 1 deletion massa-factory-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_factory_exports"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-factory-worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_factory_worker"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-final-state/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_final_state"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

7 changes: 1 addition & 6 deletions massa-final-state/src/state_changes.rs
Original file line number Diff line number Diff line change
@@ -366,12 +366,7 @@ mod test {
SetUpdateOrDelete::Update(ledger_entry),
);
state_changes.ledger_changes = ledger_changes;
let serialized = serde_json::to_string(&state_changes);
if let Err(err) = serialized {
panic!("Failed to serialize state changes: {:?}", err);
}
let serialized = serialized.unwrap();
print!("{}", serialized);
let serialized = serde_json::to_string(&state_changes).unwrap();
let state_changes_deser = serde_json::from_str(&serialized).unwrap();
assert_eq!(state_changes, state_changes_deser);
}
2 changes: 1 addition & 1 deletion massa-grpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_grpc"
version = "0.27.4"
version = "0.27.6"
edition = "2021"
description = "GRPC API for Massa Blockchain"
repository = "https://github.com/massalabs/massa/"
2 changes: 1 addition & 1 deletion massa-grpc/src/error.rs
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ use massa_signature::MassaSignatureError;
use massa_time::TimeError;
use massa_versioning::versioning_factory::FactoryError;
use massa_wallet::WalletError;
use tracing::log::error;
use tracing::error;

/// Errors of the gRPC component.
#[non_exhaustive]
2 changes: 1 addition & 1 deletion massa-grpc/src/server.rs
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ use tonic::transport::{Certificate, Identity, ServerTlsConfig};
use tonic_health::server::HealthReporter;
use tonic_web::GrpcWebLayer;
use tower_http::cors::{Any, CorsLayer};
use tracing::log::{info, warn};
use tracing::{info, warn};

/// gRPC PRIVATE API content
#[derive(Clone)]
2 changes: 1 addition & 1 deletion massa-grpc/src/stream/new_blocks.rs
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ use std::pin::Pin;
use std::str::FromStr;
use tokio::select;
use tonic::{Request, Streaming};
use tracing::log::{error, warn};
use tracing::{error, warn};

/// Type declaration for NewBlocks
pub type NewBlocksStreamType = Pin<
2 changes: 1 addition & 1 deletion massa-grpc/src/stream/new_endorsements.rs
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ use std::pin::Pin;
use std::str::FromStr;
use tokio::select;
use tonic::{Request, Streaming};
use tracing::log::{error, warn};
use tracing::{error, warn};

/// Type declaration for NewEndorsements
pub type NewEndorsementsStreamType = Pin<
2 changes: 1 addition & 1 deletion massa-grpc/src/stream/new_filled_blocks.rs
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ use std::pin::Pin;
use std::str::FromStr;
use tokio::select;
use tonic::{Request, Streaming};
use tracing::log::{error, warn};
use tracing::{error, warn};

/// Type declaration for NewFilledBlocks
pub type NewFilledBlocksStreamType = Pin<
2 changes: 1 addition & 1 deletion massa-grpc/src/stream/new_operations.rs
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ use std::pin::Pin;
use std::str::FromStr;
use tokio::select;
use tonic::{Request, Streaming};
use tracing::log::error;
use tracing::error;

/// Type declaration for NewOperations
pub type NewOperationsStreamType = Pin<
2 changes: 1 addition & 1 deletion massa-grpc/src/stream/new_slot_execution_outputs.rs
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ use std::io::ErrorKind;
use std::pin::Pin;
use tokio::select;
use tonic::{Request, Streaming};
use tracing::log::{error, warn};
use tracing::{error, warn};

/// Type declaration for NewSlotExecutionOutputs
pub type NewSlotExecutionOutputsStreamType = Pin<
2 changes: 1 addition & 1 deletion massa-grpc/src/stream/send_blocks.rs
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ use std::io::ErrorKind;
use std::pin::Pin;
use tokio::sync::mpsc::Sender;
use tonic::Request;
use tracing::log::{error, warn};
use tracing::{error, warn};

/// Type declaration for SendBlockStream
pub type SendBlocksStreamType = Pin<
2 changes: 1 addition & 1 deletion massa-grpc/src/stream/send_endorsements.rs
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ use massa_serialization::{DeserializeError, Deserializer};
use std::collections::HashMap;
use std::io::ErrorKind;
use std::pin::Pin;
use tracing::log::{error, warn};
use tracing::{error, warn};

/// Type declaration for SendEndorsements
pub type SendEndorsementsStreamType = Pin<
2 changes: 1 addition & 1 deletion massa-grpc/src/stream/send_operations.rs
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ use massa_time::MassaTime;
use std::collections::HashMap;
use std::io::ErrorKind;
use std::pin::Pin;
use tracing::log::{error, warn};
use tracing::{error, warn};

/// Type declaration for SendOperations
pub type SendOperationsStreamType = Pin<
2 changes: 1 addition & 1 deletion massa-grpc/src/stream/tx_throughput.rs
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ use massa_proto_rs::massa::api::v1 as grpc_api;
use std::pin::Pin;
use std::time::Duration;
use tokio::{select, time};
use tracing::log::error;
use tracing::error;

/// default throughput interval in seconds
///
2 changes: 1 addition & 1 deletion massa-hash/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_hash"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-ledger-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_ledger_exports"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-ledger-worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_ledger_worker"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-logging/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_logging"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-metrics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_metrics"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[features]
4 changes: 3 additions & 1 deletion massa-models/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_models"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

@@ -35,4 +35,6 @@ transition = { workspace = true }
variant_count = { workspace = true }

[dev-dependencies]
serde_json = { workspace = true }
serde_with = { workspace = true }
serial_test = { workspace = true } # BOM UPGRADE Revert to "1.0" if problem
25 changes: 20 additions & 5 deletions massa-models/src/address.rs
Original file line number Diff line number Diff line change
@@ -668,13 +668,17 @@ mod test {

#[test]
fn test_address() {
let hash = massa_hash::Hash::compute_from("ADDR".as_bytes());
let expected_user_addr_0 =
Address::from_str("AU12fZLkHnLED3okr8Lduyty7dz9ZKkd24xMCc2JJWPcdmfn2eUEx").unwrap();
let expected_sc_addr_0 =
Address::from_str("AS12fZLkHnLED3okr8Lduyty7dz9ZKkd24xMCc2JJWPcdmfn2eUEx").unwrap();

let user_addr_0 = Address::User(UserAddress::UserAddressV0(UserAddressV0(hash)));
let sc_addr_0 = Address::SC(SCAddress::SCAddressV0(SCAddressV0(hash)));
let hash = massa_hash::Hash::compute_from("ADDR".as_bytes());
let actual_user_addr_0 = Address::User(UserAddress::UserAddressV0(UserAddressV0(hash)));
let actual_sc_addr_0 = Address::SC(SCAddress::SCAddressV0(SCAddressV0(hash)));

println!("user_addr_0: {}", user_addr_0);
println!("sc_addr_0: {}", sc_addr_0);
assert_eq!(actual_user_addr_0, expected_user_addr_0);
assert_eq!(actual_sc_addr_0, expected_sc_addr_0);
}

#[test]
@@ -690,4 +694,15 @@ mod test {

assert_ne!(thread_addr_0, thread_addr_1);
}

#[test]
fn test_address_serde() {
let expected_addr =
Address::from_str("AU12fZLkHnLED3okr8Lduyty7dz9ZKkd24xMCc2JJWPcdmfn2eUEx").unwrap();

let serialized = serde_json::to_string(&expected_addr).unwrap();
let actual_addr: Address = serde_json::from_str(&serialized).unwrap();

assert_eq!(actual_addr, expected_addr);
}
}
2 changes: 1 addition & 1 deletion massa-models/src/amount.rs
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ pub const AMOUNT_DECIMAL_FACTOR: u64 = 10u64.pow(AMOUNT_DECIMAL_SCALE);
/// this allows ensuring that there is never an uncontrolled overflow or precision loss
/// while providing a convenient decimal interface for users
/// The underlying `u64` raw representation if a fixed-point value with factor `AMOUNT_DECIMAL_FACTOR`
/// The minimal value is 0 and the maximal value is 18446744073.709551615
/// The minimal value is 0 and the maximal value is 18446744073.709551615(std::u64::MAX/1e9)
#[derive(Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Default)]
pub struct Amount(u64);

74 changes: 74 additions & 0 deletions massa-models/src/block.rs
Original file line number Diff line number Diff line change
@@ -428,6 +428,7 @@ mod test {
use massa_hash::Hash;
use massa_serialization::DeserializeError;
use massa_signature::KeyPair;
use serde_json::Value;
use serial_test::serial;
use std::str::FromStr;

@@ -1223,4 +1224,77 @@ mod test {
// TODO: assert that the error variant/context/etc. matches the expected failure
assert!(res.is_err());
}

#[test]
#[serial]
fn test_block_serde() {
let keypair =
KeyPair::from_str("S1bXjyPwrssNmG4oUG5SEqaUhQkVArQi7rzQDWpCprTSmEgZDGG").unwrap();
let parents = (0..THREAD_COUNT)
.map(|_i| {
BlockId::generate_from_hash(
Hash::from_bs58_check("bq1NsaCBAfseMKSjNBYLhpK7M5eeef2m277MYS2P2k424GaDf")
.unwrap(),
)
})
.collect();

let endo1 = Endorsement::new_verifiable(
Endorsement {
slot: Slot::new(1, 0),
index: 0,
endorsed_block: BlockId::generate_from_hash(
Hash::from_bs58_check("bq1NsaCBAfseMKSjNBYLhpK7M5eeef2m277MYS2P2k424GaDf")
.unwrap(),
),
},
EndorsementSerializer::new(),
&keypair,
)
.unwrap();
let endo2 = Endorsement::new_verifiable(
Endorsement {
slot: Slot::new(1, 0),
index: ENDORSEMENT_COUNT - 1,
endorsed_block: BlockId::generate_from_hash(
Hash::from_bs58_check("bq1NsaCBAfseMKSjNBYLhpK7M5eeef2m277MYS2P2k424GaDf")
.unwrap(),
),
},
EndorsementSerializer::new(),
&keypair,
)
.unwrap();

// create block header
let orig_header = BlockHeader::new_verifiable(
BlockHeader {
current_version: 0,
announced_version: None,
slot: Slot::new(1, 0),
parents,
operation_merkle_root: Hash::compute_from("mno".as_bytes()),
endorsements: vec![endo1, endo2],
denunciations: Vec::new(), // FIXME
},
BlockHeaderSerializer::new(),
&keypair,
)
.unwrap();

// create block
let orig_block = Block {
header: orig_header.clone(),
operations: Default::default(),
};

let serialized_block = serde_json::to_string(&orig_block).unwrap();
let res_block: Value = serde_json::from_str(&serialized_block).unwrap();
// check equality
assert_eq!(orig_block.header.id.to_string(), res_block["header"]["id"]);
assert_eq!(
orig_block.header.signature.to_string(),
res_block["header"]["signature"]
);
}
}
56 changes: 56 additions & 0 deletions massa-models/src/block_header.rs
Original file line number Diff line number Diff line change
@@ -603,6 +603,7 @@ impl BlockHeaderDenunciationData {
mod test {
use super::*;
use massa_serialization::DeserializeError;
use serde_json::Value;

use crate::config::{ENDORSEMENT_COUNT, MAX_DENUNCIATIONS_PER_BLOCK_HEADER, THREAD_COUNT};

@@ -738,4 +739,59 @@ mod test {
];
verify_signature_batch(&batch_2).unwrap();
}

#[test]
fn test_block_header_serde() {
let keypair = KeyPair::generate(0).unwrap();

let slot = Slot::new(7, 1);
let parents_1: Vec<BlockId> = (0..THREAD_COUNT)
.map(|i| BlockId::generate_from_hash(Hash::compute_from(&[i])))
.collect();

let endorsement_1 = Endorsement {
slot,
index: 1,
endorsed_block: parents_1[1],
};

assert_eq!(parents_1[1], endorsement_1.endorsed_block);

let s_endorsement_1: SecureShareEndorsement =
Endorsement::new_verifiable(endorsement_1, EndorsementSerializer::new(), &keypair)
.unwrap();

let (slot_a, _, s_header_1, s_header_2, _) = gen_block_headers_for_denunciation(None, None);
assert!(slot_a < slot);
let de_a = Denunciation::try_from((&s_header_1, &s_header_2)).unwrap();
let (slot_b, _, s_endo_1, s_endo_2, _) = gen_endorsements_for_denunciation(None, None);
assert!(slot_b < slot);
let de_b = Denunciation::try_from((&s_endo_1, &s_endo_2)).unwrap();

let block_header_1 = BlockHeader {
current_version: 0,
announced_version: None,
slot,
parents: parents_1,
operation_merkle_root: Hash::compute_from("mno".as_bytes()),
endorsements: vec![s_endorsement_1],
denunciations: vec![de_a, de_b],
};

let serialized_block_header = serde_json::to_string(&block_header_1).unwrap();
let res_block_header: Value = serde_json::from_str(&serialized_block_header).unwrap();
// check equality
assert_eq!(
block_header_1.current_version,
res_block_header["current_version"]
);
assert_eq!(
block_header_1.slot.period,
res_block_header["slot"]["period"]
);
assert_eq!(
block_header_1.slot.thread,
res_block_header["slot"]["thread"]
);
}
}
16 changes: 16 additions & 0 deletions massa-models/src/block_id.rs
Original file line number Diff line number Diff line change
@@ -269,3 +269,19 @@ impl Deserializer<BlockId> for BlockIdDeserializer {
})(buffer)
}
}

#[cfg(test)]
mod test {
use super::*;

#[test]
fn test_block_id_serde() {
let expected_block_id =
BlockId::from_str("B12DvrcQkzF1Wi8BVoNfc4n93CD3E2qhCNe7nVhnEQGWHZ24fEmg").unwrap();

let serialized = serde_json::to_string(&expected_block_id).unwrap();
let actual_block_id: BlockId = serde_json::from_str(&serialized).unwrap();

assert_eq!(actual_block_id, expected_block_id);
}
}
6 changes: 3 additions & 3 deletions massa-models/src/config/constants.rs
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ lazy_static::lazy_static! {
)
)
} else {
MassaTime::from_millis(1701363600000) // Thursday, November 30, 2023 17:00:00 UTC
MassaTime::from_millis(1702639800000) // Friday, December 15, 2023 11:30:00 UTC
};

/// TESTNET: time when the blockclique is ended.
@@ -77,9 +77,9 @@ lazy_static::lazy_static! {
/// node version
pub static ref VERSION: Version = {
if cfg!(feature = "sandbox") {
"SAND.27.4"
"SAND.27.6"
} else {
"SECU.27.4"
"SECU.27.6"
}
.parse()
.unwrap()
22 changes: 22 additions & 0 deletions massa-models/src/datastore.rs
Original file line number Diff line number Diff line change
@@ -179,6 +179,12 @@ mod tests {

use super::*;
use massa_serialization::DeserializeError;
use serde::{Deserialize, Serialize};
use serde_with::serde_as;

#[serde_as]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct SerdeWrapper(#[serde_as(as = "Vec<(_, _)>")] Datastore);

#[test]
fn test_ser_der() {
@@ -233,4 +239,20 @@ mod tests {
.deserialize::<DeserializeError>(&buffer)
.unwrap();
}

#[test]
fn test_datastore_serde() {
let expected_datastore: Datastore = BTreeMap::from([
(vec![1, 2], vec![3, 4]),
(vec![5, 6, 7], vec![8]),
(vec![9], vec![10, 11, 12, 13, 14]),
(vec![], vec![]),
]);

let wrapper = SerdeWrapper(expected_datastore.clone());
let serialized = serde_json::to_string(&wrapper).unwrap();
let actual_wrapper: SerdeWrapper = serde_json::from_str(&serialized).unwrap();

assert_eq!(actual_wrapper.0, expected_datastore);
}
}
27 changes: 27 additions & 0 deletions massa-models/src/endorsement.rs
Original file line number Diff line number Diff line change
@@ -511,6 +511,7 @@ impl EndorsementDenunciationData {
mod tests {
use crate::secure_share::{SecureShareContent, SecureShareDeserializer, SecureShareSerializer};
use massa_signature::verify_signature_batch;
use serde_json::Value;

use super::*;
use massa_serialization::DeserializeError;
@@ -626,4 +627,30 @@ mod tests {
];
verify_signature_batch(&batch_2).unwrap();
}

#[test]
#[serial]
fn test_endorsement_serde() {
let orig_endorsement = Endorsement {
slot: Slot::new(10, 1),
index: 0,
endorsed_block: BlockId::generate_from_hash(Hash::compute_from("blk".as_bytes())),
};
let serialized_endorsement = serde_json::to_string(&orig_endorsement).unwrap();
let res_endorsement: Value = serde_json::from_str(&serialized_endorsement).unwrap();
// check equality
assert_eq!(
orig_endorsement.slot.period,
res_endorsement["slot"]["period"]
);
assert_eq!(
orig_endorsement.slot.thread,
res_endorsement["slot"]["thread"]
);
assert_eq!(orig_endorsement.index, res_endorsement["index"]);
assert_eq!(
orig_endorsement.endorsed_block.to_string(),
res_endorsement["endorsed_block"]
);
}
}
123 changes: 123 additions & 0 deletions massa-models/src/operation.rs
Original file line number Diff line number Diff line change
@@ -1475,6 +1475,7 @@ mod tests {
use super::*;
use massa_serialization::DeserializeError;
use massa_signature::KeyPair;
use serde_json::Value;
use serial_test::serial;
use std::collections::BTreeMap;

@@ -1701,4 +1702,126 @@ mod tests {

assert_eq!(op.get_validity_range(10), 40..=50);
}

#[test]
#[serial]
fn test_transaction_serde() {
let recv_keypair = KeyPair::generate(0).unwrap();

let op: OperationType = OperationType::Transaction {
recipient_address: Address::from_public_key(&recv_keypair.get_public_key()),
amount: Amount::default(),
};
let mut ser_type = Vec::new();
OperationTypeSerializer::new()
.serialize(&op, &mut ser_type)
.unwrap();
let (_, res_type) = OperationTypeDeserializer::new(
MAX_DATASTORE_VALUE_LENGTH,
MAX_FUNCTION_NAME_LENGTH,
MAX_PARAMETERS_SIZE,
MAX_OPERATION_DATASTORE_ENTRY_COUNT,
MAX_OPERATION_DATASTORE_KEY_LENGTH,
MAX_OPERATION_DATASTORE_VALUE_LENGTH,
)
.deserialize::<DeserializeError>(&ser_type)
.unwrap();

assert_eq!(res_type, op);

let orig_operation = Operation {
fee: Amount::from_str("20").unwrap(),
op,
expire_period: 50,
};

let serialized_operation = serde_json::to_string(&orig_operation).unwrap();
let res_operation: Value = serde_json::from_str(&serialized_operation).unwrap();
// check equality
assert_eq!(orig_operation.fee.to_string(), res_operation["fee"]);
assert_eq!(orig_operation.expire_period, res_operation["expire_period"]);
}

#[test]
#[serial]
fn test_executesc_serde() {
let op = OperationType::ExecuteSC {
max_gas: 123,
max_coins: Amount::from_str("1.0").unwrap(),
data: vec![23u8, 123u8, 44u8],
datastore: BTreeMap::from([
(vec![1, 2, 3], vec![4, 5, 6, 7, 8, 9]),
(vec![22, 33, 44, 55, 66, 77], vec![11]),
]),
};
let mut ser_type = Vec::new();
OperationTypeSerializer::new()
.serialize(&op, &mut ser_type)
.unwrap();
let (_, res_type) = OperationTypeDeserializer::new(
MAX_DATASTORE_VALUE_LENGTH,
MAX_FUNCTION_NAME_LENGTH,
MAX_PARAMETERS_SIZE,
MAX_OPERATION_DATASTORE_ENTRY_COUNT,
MAX_OPERATION_DATASTORE_KEY_LENGTH,
MAX_OPERATION_DATASTORE_VALUE_LENGTH,
)
.deserialize::<DeserializeError>(&ser_type)
.unwrap();
assert_eq!(res_type, op);

let orig_operation = Operation {
fee: Amount::from_str("20").unwrap(),
op,
expire_period: 50,
};

let serialized_operation = serde_json::to_string(&orig_operation).unwrap();
let res_operation: Value = serde_json::from_str(&serialized_operation).unwrap();
// check equality
assert_eq!(orig_operation.fee.to_string(), res_operation["fee"]);
assert_eq!(orig_operation.expire_period, res_operation["expire_period"]);
}

#[test]
#[serial]
fn test_callsc_serde() {
let target_keypair = KeyPair::generate(0).unwrap();
let target_addr = Address::from_public_key(&target_keypair.get_public_key());

let op = OperationType::CallSC {
max_gas: 123,
target_addr,
coins: Amount::from_str("456.789").unwrap(),
target_func: "target function".to_string(),
param: b"parameter".to_vec(),
};
let mut ser_type = Vec::new();
OperationTypeSerializer::new()
.serialize(&op, &mut ser_type)
.unwrap();
let (_, res_type) = OperationTypeDeserializer::new(
MAX_DATASTORE_VALUE_LENGTH,
MAX_FUNCTION_NAME_LENGTH,
MAX_PARAMETERS_SIZE,
MAX_OPERATION_DATASTORE_ENTRY_COUNT,
MAX_OPERATION_DATASTORE_KEY_LENGTH,
MAX_OPERATION_DATASTORE_VALUE_LENGTH,
)
.deserialize::<DeserializeError>(&ser_type)
.unwrap();
assert_eq!(res_type, op);

let orig_operation = Operation {
fee: Amount::from_str("20").unwrap(),
op,
expire_period: 50,
};

let serialized_operation = serde_json::to_string(&orig_operation).unwrap();
let res_operation: Value = serde_json::from_str(&serialized_operation).unwrap();
// check equality
assert_eq!(orig_operation.fee.to_string(), res_operation["fee"]);
assert_eq!(orig_operation.expire_period, res_operation["expire_period"]);
}
}
2 changes: 1 addition & 1 deletion massa-module-cache/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_module_cache"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[features]
2 changes: 1 addition & 1 deletion massa-node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa-node"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

25 changes: 11 additions & 14 deletions massa-node/base_config/config.toml
Original file line number Diff line number Diff line change
@@ -190,7 +190,7 @@
max_final_events = 10000
# maximum length of the read-only execution requests queue
readonly_queue_length = 10
# by how many milliseconds shoud the execution lag behind real time
# by how many milliseconds should the execution lag behind real time
# higher values increase speculative execution lag but improve performance
cursor_delay = 2000
# duration of the statistics time window in milliseconds
@@ -260,7 +260,7 @@
initial_peers_file = "base_config/initial_peers.json"
# Limit of read/write number of bytes per second with a peer (Should be a 10 multiple)
read_write_limit_bytes_per_second = 2_000_000_000
# timeout after which without answer a hanshake is ended
# timeout after which without answer a handshake is ended
message_timeout = 5000
# timeout after which a peer tester will consider the peer unreachable
tester_timeout = 10000
@@ -345,18 +345,15 @@
[bootstrap]
# list of bootstrap (ip, node id)
bootstrap_list = [
["149.202.86.103:31245", "N12UbyLJDS7zimGWf3LTHe8hYY67RdLke1iDRZqJbQQLHQSKPW8j"],
["149.202.89.125:31245", "N12vxrYTQzS5TRzxLfFNYxn6PyEsphKWkdqx2mVfEuvJ9sPF43uq"],
["158.69.120.215:31245", "N12rPDBmpnpnbECeAKDjbmeR19dYjAUwyLzsa8wmYJnkXLCNF28E"],
["158.69.23.120:31245", "N1XxexKa3XNzvmakNmPawqFrE9Z2NFhfq1AhvV1Qx4zXq5p1Bp9"],
["198.27.74.5:31245", "N1qxuqNnx9kyAMYxUfsYiv2gQd5viiBX126SzzexEdbbWd2vQKu"],
["198.27.74.52:31245", "N1hdgsVsd4zkNp8cF1rdqqG6JPRQasAmx12QgJaJHBHFU1fRHEH"],
["54.36.174.177:31245", "N1gEdBVEbRFbBxBtrjcTDDK9JPbJFDay27uiJRE3vmbFAFDKNh7"],
["51.75.60.228:31245", "N13Ykon8Zo73PTKMruLViMMtE2rEG646JQ4sCcee2DnopmVM3P5"],
["[2001:41d0:1004:67::]:31245", "N12UbyLJDS7zimGWf3LTHe8hYY67RdLke1iDRZqJbQQLHQSKPW8j"],
["[2001:41d0:a:7f7d::]:31245", "N12vxrYTQzS5TRzxLfFNYxn6PyEsphKWkdqx2mVfEuvJ9sPF43uq"],
["[2001:41d0:602:db1::]:31245", "N1gEdBVEbRFbBxBtrjcTDDK9JPbJFDay27uiJRE3vmbFAFDKNh7"],
["[2001:41d0:602:21e4::]:31245", "N13Ykon8Zo73PTKMruLViMMtE2rEG646JQ4sCcee2DnopmVM3P5"],
["149.202.86.103:31245", "N1o5rMYJesvxG95r6hXxhhUR1RaPdh9jn98qmqVaNbjESDEikgw"],
["149.202.89.125:31245", "N127Mk2JNqJ3H5DX1Cr9Zt6PA3MkxhTpsnLS1kFwg1mxoPHvSHjT"],
["158.69.120.215:31245", "N12h3BMD6KWn5w7Yfi9Ne4PEgbBzqZRXQvGkNHf6ZMif541GJDY5"],
["158.69.23.120:31245", "N12349v9sgHx2XsDZi83NhMiK1dkYq25wPQn9KrxWLaNnVgKfsoL"],
["198.27.74.5:31245", "N12AiHa16Yvfcqv35fCCNZnsqRSqVVCYYqfRqJQmGr9Zik2Ctqbk"],
["51.75.60.228:31245", "N12PLM45E6zDtnxg946toWz8zDSVbNEUXXSqJkAjeweqAK5metxS"],
["[2001:41d0:1004:67::]:31245", "N1o5rMYJesvxG95r6hXxhhUR1RaPdh9jn98qmqVaNbjESDEikgw"],
["[2001:41d0:a:7f7d::]:31245", "N127Mk2JNqJ3H5DX1Cr9Zt6PA3MkxhTpsnLS1kFwg1mxoPHvSHjT"],
["[2001:41d0:602:21e4::]:31245", "N12PLM45E6zDtnxg946toWz8zDSVbNEUXXSqJkAjeweqAK5metxS"],
]
# force the bootstrap protocol to use: "IPv4", "IPv6", or "Both". Defaults to using both protocols.
bootstrap_protocol = "Both"
16 changes: 16 additions & 0 deletions massa-node/base_config/deferred_credits.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
{
"AU12NU3ZLfRrwvrErJtU89m6EWnaSJrzcfG5xB6GBFDnxqt6DAJzv": [
{
"slot": {"period": 30, "thread": 0},
"amount": "1000000000"
},
{
"slot": {"period": 400, "thread": 1},
"amount": "1000000000"
}
],
"AU1AzJfZYayiR6Ac8SsUsCC3zQchCyddRYsb5tRE1TJFNiQd1TES": [
{
"slot": {"period": 30, "thread": 0},
"amount": "1000000000"
}
]
}
14 changes: 7 additions & 7 deletions massa-node/base_config/initial_ledger.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"AU12Cyu2f7C7isA3ADAhoNuq9ZUFPKP24jmiGj3sh9D1pHoAWKDYY": {
"AU12NU3ZLfRrwvrErJtU89m6EWnaSJrzcfG5xB6GBFDnxqt6DAJzv": {
"balance": "1000000000",
"datastore": [],
"bytecode": []
},
"AU12BTfZ7k1z6PsLEUZeHYNirz6WJ3NdrWto9H4TkVpkV9xE2TJg2": {
"AU1AzJfZYayiR6Ac8SsUsCC3zQchCyddRYsb5tRE1TJFNiQd1TES": {
"balance": "1000000000",
"datastore": [],
"bytecode": []
},
"AU12csSYjnkK3HnM2gdsDhkFtT3iX8Ax5qtJH4zcoK79MB8xbdoPw": {
"AU1VjFiP7RKeTeE6iLXqbRA2SKVZp6s3KhH3pmxU8SpGaQhJm9Sd": {
"balance": "1000000000",
"datastore": [],
"bytecode": []
},
"AU1jDpoDo1p4PU4KwFMWbP1xktueEEmkn9MVFbom5oxfXLCyT7BR": {
"AU1zCtAy2fsJEk9Mt73vLSe4cWRsqifhpLDVDW2Tx13SWXFNUhg2": {
"balance": "1000000000",
"datastore": [],
"bytecode": []
},
"AU12FHsSoETq67gF3eVAecRR8cmoLGhFErUm4Q524tEsuoaCg4tSH": {
"AU1Rgjt9jkCfed4ePPSRVLE3GAaqNfTtrjNB2PwuQBmH1B8VggTi": {
"balance": "1000000000",
"datastore": [],
"bytecode": []
},
"AU1r5GxEpBBGmtK7JY4LVHghjtr87jof5WkPh68oyddHRU32qct3": {
"AU12fpWrC7dsdkR5Ui69knKZ592x7FDzFCpYFgWEWcQcuQxhQmP7N": {
"balance": "1000000000",
"datastore": [],
"bytecode": []
},
"AU1LzG14pkp87tKDpbQPCjCnSEdww8KPeX1qaD4cxPzjJcd2fQWH": {
"AU129gx6jyWxUGUCJjx1pvWKfNe5RrsFo8qDzCiW8QvMwVZhXvJD6": {
"balance": "1000000000",
"datastore": [],
"bytecode": []
12 changes: 6 additions & 6 deletions massa-node/base_config/initial_peers.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
{
"P12UbyLJDS7zimGWf3LTHe8hYY67RdLke1iDRZqJbQQLHQSKPW8j": {
"P1o5rMYJesvxG95r6hXxhhUR1RaPdh9jn98qmqVaNbjESDEikgw": {
"listeners": {
"149.202.86.103:31244": "Tcp"
},
"category": "Bootstrap"

},
"P12vxrYTQzS5TRzxLfFNYxn6PyEsphKWkdqx2mVfEuvJ9sPF43uq": {
"P127Mk2JNqJ3H5DX1Cr9Zt6PA3MkxhTpsnLS1kFwg1mxoPHvSHjT": {
"listeners": {
"149.202.89.125:31244": "Tcp"
},
"category": "Bootstrap"
},
"P12rPDBmpnpnbECeAKDjbmeR19dYjAUwyLzsa8wmYJnkXLCNF28E": {
"P12h3BMD6KWn5w7Yfi9Ne4PEgbBzqZRXQvGkNHf6ZMif541GJDY5": {
"listeners": {
"158.69.120.215:31244": "Tcp"
},
"category": "Bootstrap"
},
"P1XxexKa3XNzvmakNmPawqFrE9Z2NFhfq1AhvV1Qx4zXq5p1Bp9": {
"P12349v9sgHx2XsDZi83NhMiK1dkYq25wPQn9KrxWLaNnVgKfsoL": {
"listeners": {
"158.69.23.120:31244": "Tcp"
},
"category": "Bootstrap"
},
"P1qxuqNnx9kyAMYxUfsYiv2gQd5viiBX126SzzexEdbbWd2vQKu": {
"P12AiHa16Yvfcqv35fCCNZnsqRSqVVCYYqfRqJQmGr9Zik2Ctqbk": {
"listeners": {
"198.27.74.5:31244": "Tcp"
},
"category": "Bootstrap"
},
"P13Ykon8Zo73PTKMruLViMMtE2rEG646JQ4sCcee2DnopmVM3P5": {
"P12PLM45E6zDtnxg946toWz8zDSVbNEUXXSqJkAjeweqAK5metxS": {
"listeners": {
"51.75.60.228:31244": "Tcp"
},
14 changes: 7 additions & 7 deletions massa-node/base_config/initial_rolls.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"AU12Cyu2f7C7isA3ADAhoNuq9ZUFPKP24jmiGj3sh9D1pHoAWKDYY": 1000,
"AU12BTfZ7k1z6PsLEUZeHYNirz6WJ3NdrWto9H4TkVpkV9xE2TJg2": 1000,
"AU12csSYjnkK3HnM2gdsDhkFtT3iX8Ax5qtJH4zcoK79MB8xbdoPw": 1000,
"AU1jDpoDo1p4PU4KwFMWbP1xktueEEmkn9MVFbom5oxfXLCyT7BR": 1000,
"AU12FHsSoETq67gF3eVAecRR8cmoLGhFErUm4Q524tEsuoaCg4tSH": 1000,
"AU1r5GxEpBBGmtK7JY4LVHghjtr87jof5WkPh68oyddHRU32qct3": 1000,
"AU1LzG14pkp87tKDpbQPCjCnSEdww8KPeX1qaD4cxPzjJcd2fQWH": 1000
"AU12NU3ZLfRrwvrErJtU89m6EWnaSJrzcfG5xB6GBFDnxqt6DAJzv": 1000,
"AU1AzJfZYayiR6Ac8SsUsCC3zQchCyddRYsb5tRE1TJFNiQd1TES": 1000,
"AU1VjFiP7RKeTeE6iLXqbRA2SKVZp6s3KhH3pmxU8SpGaQhJm9Sd": 1000,
"AU1zCtAy2fsJEk9Mt73vLSe4cWRsqifhpLDVDW2Tx13SWXFNUhg2": 1000,
"AU1Rgjt9jkCfed4ePPSRVLE3GAaqNfTtrjNB2PwuQBmH1B8VggTi": 1000,
"AU12fpWrC7dsdkR5Ui69knKZ592x7FDzFCpYFgWEWcQcuQxhQmP7N": 1000,
"AU129gx6jyWxUGUCJjx1pvWKfNe5RrsFo8qDzCiW8QvMwVZhXvJD6": 1000
}
2 changes: 1 addition & 1 deletion massa-node/base_config/openrpc.json
Original file line number Diff line number Diff line change
@@ -230,7 +230,7 @@
},
"name": "get_cliques",
"summary": "Get cliques",
"description": "Returns informations about cliques."
"description": "Returns information about cliques."
},
{
"tags": [
2 changes: 1 addition & 1 deletion massa-node/src/main.rs
Original file line number Diff line number Diff line change
@@ -329,7 +329,7 @@ async fn launch(
None => {
// The node is started in a normal way
// Read the mip list supported by the current software
// The resulting MIP store will likely be updated by the boostrap process in order
// The resulting MIP store will likely be updated by the bootstrap process in order
// to get the latest information for the MIP store (new states, votes...)

let mip_list = get_mip_list();
2 changes: 1 addition & 1 deletion massa-pool-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_pool_exports"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-pool-worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_pool_worker"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-pos-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_pos_exports"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-pos-worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_pos_worker"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-protocol-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_protocol_exports"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-protocol-worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_protocol_worker"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

4 changes: 2 additions & 2 deletions massa-protocol-worker/src/connectivity.rs
Original file line number Diff line number Diff line change
@@ -270,7 +270,7 @@ pub(crate) fn start_connectivity_thread(
if let Some(slots) = connection_slots.get_mut(peer_category.as_str()) {
*slots = slots.saturating_sub(1);
} else {
tracing::log::warn!("Category of connected peer {peer_category} not known in configuration");
tracing::warn!("Category of connected peer {peer_category} not known in configuration");
}
} else {
let slots = connection_slots.get_mut("default").unwrap();
@@ -329,7 +329,7 @@ pub(crate) fn start_connectivity_thread(

addresses_can_connect.push((*addr, connection_metadata, category_found));
} else {
tracing::log::warn!("No listeners for the peer {peer_id}");
tracing::warn!("No listeners for the peer {peer_id}");
}
}
}
2 changes: 1 addition & 1 deletion massa-protocol-worker/src/handlers/peer_handler/mod.rs
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ use peernet::{
peer::InitConnectionHandler,
transports::{endpoint::Endpoint, TransportType},
};
use tracing::log::{debug, error, info, warn};
use tracing::{debug, error, info, warn};

use crate::context::Context;
use crate::handlers::peer_handler::models::PeerState;
2 changes: 1 addition & 1 deletion massa-protocol-worker/src/handlers/peer_handler/models.rs
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ use std::cmp::Ordering;
use std::collections::HashSet;
use std::time::Duration;
use std::{collections::HashMap, net::SocketAddr, sync::Arc};
use tracing::log::info;
use tracing::info;

use crate::wrap_peer_db::PeerDBTrait;

4 changes: 2 additions & 2 deletions massa-protocol-worker/src/handlers/peer_handler/tester.rs
Original file line number Diff line number Diff line change
@@ -246,7 +246,7 @@ impl Tester {
}

if let Err(e) = socket.shutdown(std::net::Shutdown::Both) {
tracing::log::error!("Failed to shutdown socket for {} : {}", addr, e);
tracing::error!("Failed to shutdown socket for {} : {}", addr, e);
}
res
};
@@ -403,7 +403,7 @@ impl Tester {
// &OutConnectionConfig::Tcp(Box::new(TcpOutConnectionConfig::new(protocol_config.read_write_limit_bytes_per_second / 10, Duration::from_millis(100)))),
// );

tracing::log::debug!("{:?}", res);
tracing::debug!("{:?}", res);
}
};
}
2 changes: 1 addition & 1 deletion massa-sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_sdk"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[dependencies]
2 changes: 1 addition & 1 deletion massa-serialization/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_serialization"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-signature/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_signature"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_storage"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-test-framework/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_test_framework"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-time/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_time"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-versioning/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_versioning"
version = "0.27.4"
version = "0.27.6"
authors = ["Massa Labs <info@massa.net>"]
edition = "2021"

2 changes: 1 addition & 1 deletion massa-wallet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_wallet"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
2 changes: 1 addition & 1 deletion massa-xtask/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "massa_xtask"
version = "0.27.4"
version = "0.27.6"
edition = "2021"

[dependencies]
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.74.0"
channel = "1.74.1"

0 comments on commit 1425b01

Please sign in to comment.