Skip to content

Commit

Permalink
Merge pull request AleoNet#2376 from AleoHQ/feat/staging-cleanup
Browse files Browse the repository at this point in the history
Cleanup CLI and remove unnecessary coinbase enforcement
  • Loading branch information
howardwu authored May 10, 2023
2 parents 18804d9 + 640d71d commit 2c8a242
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
18 changes: 14 additions & 4 deletions cli/src/commands/developer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,27 @@ impl Developer {
// Send the deployment request to the local development node.
match ureq::post(&endpoint).send_json(&transaction) {
Ok(id) => {
// Remove the quotes from the response.
let response_string = id.into_string()?.trim_matches('\"').to_string();
ensure!(
id.into_string()? == transaction_id.to_string(),
"The response does not match the transaction id"
response_string == transaction_id.to_string(),
"The response does not match the transaction id. ({response_string} != {transaction_id})"
);

match transaction {
Transaction::Deploy(..) => {
println!("✅ Successfully deployed '{}' to {}.", operation.bold(), endpoint)
println!(
"✅ Successfully broadcast deployment {transaction_id} ('{}') to {}.",
operation.bold(),
endpoint
)
}
Transaction::Execute(..) => {
println!("✅ Successfully broadcast execution '{}' to the {}.", operation.bold(), endpoint)
println!(
"✅ Successfully broadcast execution {transaction_id} ('{}') to {}.",
operation.bold(),
endpoint
)
}
Transaction::Fee(..) => {
println!("❌ Failed to broadcast fee '{}' to the {}.", operation.bold(), endpoint)
Expand Down
5 changes: 0 additions & 5 deletions node/consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,6 @@ impl<N: Network, C: ConsensusStorage<N>> Consensus<N, C> {
if block.header().coinbase_accumulator_point() != coinbase.to_accumulator_point()? {
bail!("Coinbase accumulator point does not match the coinbase solution.");
}
// TODO (howardwu): Remove this in Phase 3.
// Ensure the number of prover solutions is within the allowed range.
if block.height() > 128_000 && coinbase.len() > 256 {
bail!("Cannot validate a coinbase proof with more than {} prover solutions", 256);
}
// Ensure the number of prover solutions is within the allowed range.
if coinbase.len() > N::MAX_PROVER_SOLUTIONS {
bail!("Cannot validate a coinbase proof with more than {} prover solutions", N::MAX_PROVER_SOLUTIONS);
Expand Down

0 comments on commit 2c8a242

Please sign in to comment.