Skip to content

Commit

Permalink
Merge pull request #5148 from oasisprotocol/kostko/fix/clear-verifica…
Browse files Browse the repository at this point in the history
…tion-trace

runtime: Clear verification trace after block verification
  • Loading branch information
kostko authored Jan 18, 2023
2 parents 473dade + f107cf3 commit 700e5dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/5148.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime: Clear verification trace after block verification
3 changes: 3 additions & 0 deletions runtime/src/consensus/tendermint/verifier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ impl Verifier {
}
.map_err(|err| Error::VerificationFailed(err.into()))?;

// Clear verification trace as it could otherwise lead to infinite memory growth.
instance.state.verification_trace.clear();

cache.update_verified_block(&verified_block);
self.update_insecure_posix_time(&verified_block);

Expand Down

0 comments on commit 700e5dc

Please sign in to comment.