Skip to content

Commit

Permalink
revert: merge development to feature-dan2 (#6100) (#6102)
Browse files Browse the repository at this point in the history
Description
---
This reverts commit 01866d1. (#6100)
Motivation and Context
---

How Has This Been Tested?
---

What process can a PR reviewer use to test or verify this change?
---

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
sdbondi committed Jan 26, 2024
1 parent 01866d1 commit ee8846d
Show file tree
Hide file tree
Showing 45 changed files with 219 additions and 415 deletions.
48 changes: 24 additions & 24 deletions Cargo.lock

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

10 changes: 4 additions & 6 deletions applications/minotari_app_grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ authors = ["The Tari Development Community"]
description = "This crate is to provide a single source for all cross application grpc files and conversions to and from tari::core"
repository = "https://github.com/tari-project/tari"
license = "BSD-3-Clause"
version = "0.53.0-dan.0"
version = "1.0.0-pre.5"
edition = "2018"

[dependencies]
tari_common_types = { path = "../../base_layer/common_types" }
tari_common_types = { path = "../../base_layer/common_types" }
tari_comms = { path = "../../comms/core" }
tari_core = { path = "../../base_layer/core" }
tari_crypto = { version = "0.20" }
Expand All @@ -27,13 +27,11 @@ rcgen = "0.11.3"
subtle = { version = "2.5.0", features = ["core_hint_black_box"] }
thiserror = "1"
tokio = { version = "1.23", features = ["fs"] }
tonic = { version = "0.8.3", features = ["tls"] }
tonic = { version = "0.8.3", features = ["tls"]}
zeroize = "1"

[build-dependencies]
tonic-build = "0.8.4"

[package.metadata.cargo-machete]
ignored = [
"prost",
] # this is so we can run cargo machete without getting false positive about macro dependancies
ignored = ["prost"] # this is so we can run cargo machete without getting false positive about macro dependancies
1 change: 0 additions & 1 deletion applications/minotari_app_grpc/proto/sidechain_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ message SideChainFeature {
message ValidatorNodeRegistration {
bytes public_key = 1;
Signature signature = 2;
bytes claim_public_key = 3;
}

message TemplateRegistration {
Expand Down
5 changes: 2 additions & 3 deletions applications/minotari_app_grpc/proto/wallet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,8 @@ message TransactionEventResponse {
message RegisterValidatorNodeRequest {
bytes validator_node_public_key = 1;
Signature validator_node_signature = 2;
bytes validator_node_claim_public_key = 3;
uint64 fee_per_gram = 4;
string message = 5;
uint64 fee_per_gram = 3;
string message = 4;
}

message RegisterValidatorNodeResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,13 @@ impl TryFrom<grpc::ValidatorNodeRegistration> for ValidatorNodeRegistration {
type Error = String;

fn try_from(value: grpc::ValidatorNodeRegistration) -> Result<Self, Self::Error> {
let public_key =
PublicKey::from_canonical_bytes(&value.public_key).map_err(|e| format!("Invalid public key: {}", e))?;
let claim_public_key = PublicKey::from_canonical_bytes(&value.claim_public_key)
.map_err(|e| format!("Invalid claim public key: {}", e))?;

Ok(ValidatorNodeRegistration::new(
ValidatorNodeSignature::new(
public_key,
value
.signature
.map(Signature::try_from)
.ok_or("signature not provided")??,
),
claim_public_key,
))
Ok(ValidatorNodeRegistration::new(ValidatorNodeSignature::new(
PublicKey::from_canonical_bytes(&value.public_key).map_err(|e| e.to_string())?,
value
.signature
.map(Signature::try_from)
.ok_or("signature not provided")??,
)))
}
}

Expand All @@ -110,7 +102,6 @@ impl From<ValidatorNodeRegistration> for grpc::ValidatorNodeRegistration {
Self {
public_key: value.public_key().to_vec(),
signature: Some(value.signature().into()),
claim_public_key: value.claim_public_key().to_vec(),
}
}
}
Expand Down
11 changes: 3 additions & 8 deletions applications/minotari_app_utilities/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minotari_app_utilities"
version = "0.53.0-dan.0"
version = "1.0.0-pre.5"
authors = ["The Tari Development Community"]
edition = "2018"
license = "BSD-3-Clause"
Expand All @@ -14,9 +14,7 @@ tari_utilities = { version = "0.7" }
minotari_app_grpc = { path = "../minotari_app_grpc", optional = true }

clap = { version = "3.2", features = ["derive", "env"] }
futures = { version = "^0.3.16", default-features = false, features = [
"alloc",
] }
futures = { version = "^0.3.16", default-features = false, features = ["alloc"] }
json5 = "0.4"
log = { version = "0.4.8", features = ["std"] }
rand = "0.8"
Expand All @@ -28,10 +26,7 @@ tonic = "0.8.3"


[build-dependencies]
tari_common = { path = "../../common", features = [
"build",
"static-application-info",
] }
tari_common = { path = "../../common", features = ["build", "static-application-info"] }
tari_features = { path = "../../common/tari_features" }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ pub fn setup_node_identity<P: AsRef<Path>>(
),
)),
Err(e) => {
if create_id {
warn!(target: LOG_TARGET, "Failed to load node identity: {}", e);
} else {
let prompt = prompt("Node identity does not exist.\nWould you like to to create one (Y/n)?");
debug!(target: LOG_TARGET, "Failed to load node identity: {}", e);
if !create_id {
let prompt = prompt("Node identity does not exist.\nWould you like to create one (Y/n)?");
if !prompt {
error!(
target: LOG_TARGET,
Expand All @@ -91,6 +90,7 @@ pub fn setup_node_identity<P: AsRef<Path>>(
));
};
}

debug!(target: LOG_TARGET, "Existing node id not found. {}. Creating new ID", e);

match create_new_node_identity(&identity_file, public_addresses, peer_features) {
Expand Down
2 changes: 1 addition & 1 deletion applications/minotari_console_wallet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minotari_console_wallet"
version = "0.53.0-dan.0"
version = "1.0.0-pre.5"
authors = ["The Tari Development Community"]
edition = "2018"
license = "BSD-3-Clause"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ pub async fn register_validator_node(
mut wallet_transaction_service: TransactionServiceHandle,
validator_node_public_key: PublicKey,
validator_node_signature: Signature,
validator_node_claim_public_key: PublicKey,
selection_criteria: UtxoSelectionCriteria,
fee_per_gram: MicroMinotari,
message: String,
Expand All @@ -212,7 +211,6 @@ pub async fn register_validator_node(
amount,
validator_node_public_key,
validator_node_signature,
validator_node_claim_public_key,
selection_criteria,
fee_per_gram,
message,
Expand Down Expand Up @@ -971,9 +969,8 @@ pub async fn command_runner(
args.validator_node_public_key.into(),
Signature::new(
args.validator_node_public_nonce.into(),
RistrettoSecretKey::from_vec(&args.validator_node_signature[0])?,
RistrettoSecretKey::from_vec(&args.validator_node_signature)?,
),
args.validator_node_claim_public_key.into(),
UtxoSelectionCriteria::default(),
config.fee_per_gram * uT,
args.message,
Expand Down
Loading

0 comments on commit ee8846d

Please sign in to comment.