Skip to content

Commit

Permalink
keymanager: Increase MAX_FRESH_HEIGHT_AGE
Browse files Browse the repository at this point in the history
This avoids issues where key managers get out of sync during operation
and start rejecting otherwise valid requests. It should still be safe
especially since all new runtimes now perform freshness checks.
  • Loading branch information
kostko committed May 24, 2024
1 parent 7c21149 commit c0ea7c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changelog/5703.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
keymanager: Increase MAX_FRESH_HEIGHT_AGE

This avoids issues where key managers get out of sync during operation
and start rejecting otherwise valid requests. It should still be safe
especially since all new runtimes now perform freshness checks.
4 changes: 2 additions & 2 deletions keymanager/src/runtime/secrets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const MAX_EPHEMERAL_KEY_AGE: EpochTime = 10;
/// Maximum age of a fresh height in the number of blocks.
///
/// A height is considered fresh if it is not more than specified amount
/// of blocks lower than the height of the latest trust root.
const MAX_FRESH_HEIGHT_AGE: u64 = 50;
/// of blocks lower than the height of the latest verified height.
const MAX_FRESH_HEIGHT_AGE: u64 = 600; // ~1 hr @ 6s/block

/// Master and ephemeral secrets RPC handler.
pub struct Secrets {
Expand Down

0 comments on commit c0ea7c1

Please sign in to comment.