Skip to content

Commit

Permalink
fix: replace usage of RangeProof MR with Witness MR (#3129)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
There are still some names references a rangeproof Mr, this does not exist anymore and there is only a witness Mr. 

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
* [x] I'm merging against the `development` branch.
* [x] I have squashed my commits into a single commit.
  • Loading branch information
aviator-app[bot] authored Jul 27, 2021
2 parents d0d1d61 + 4932d26 commit bbfc687
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion base_layer/core/src/blocks/block_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl Display for BlockHeader {
)?;
writeln!(
fmt,
"Merkle roots:\nInputs: {},\n Outputs: {} ({})\nRange proofs: {}\nKernels: {} ({})\n",
"Merkle roots:\nInputs: {},\n Outputs: {} ({})\nWitness: {}\nKernels: {} ({})\n",
self.input_mr.to_hex(),
self.output_mr.to_hex(),
self.output_mmr_size,
Expand Down
2 changes: 1 addition & 1 deletion base_layer/core/src/validation/block_validators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ fn check_mmr_roots<B: BlockchainBackend>(block: &Block, db: &B) -> Result<(), Va
if header.witness_mr != mmr_roots.witness_mr {
warn!(
target: LOG_TARGET,
"Block header range_proof MMR roots in {} do not match calculated roots",
"Block header witness MMR roots in {} do not match calculated roots",
block.hash().to_hex()
);
return Err(ValidationError::BlockError(BlockValidationError::MismatchedMmrRoots));
Expand Down
8 changes: 0 additions & 8 deletions base_layer/core/src/validation/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ pub enum ValidationError {
ContainsSTxO,
#[error("Transaction contains already outputs that already exist")]
ContainsTxO,
#[error("The recorded chain accumulated difficulty was stronger")]
WeakerAccumulatedDifficulty,
#[error("Invalid output merkle root")]
InvalidOutputMr,
#[error("Invalid kernel merkle root")]
InvalidKernelMr,
#[error("Invalid range proof merkle root")]
InvalidRangeProofMr,
#[error("Final state validation failed: The UTXO set did not balance with the expected emission at height {0}")]
ChainBalanceValidationFailed(u64),
#[error("Proof of work error: {0}")]
Expand Down

0 comments on commit bbfc687

Please sign in to comment.