Skip to content

feat: make cache service prune expired ingress proofs from the cache#1024

Merged
antouhou merged 38 commits into
masterfrom
feat-prune-ingress-proofs-for-real
Nov 25, 2025
Merged

feat: make cache service prune expired ingress proofs from the cache#1024
antouhou merged 38 commits into
masterfrom
feat-prune-ingress-proofs-for-real

Conversation

@antouhou

@antouhou antouhou commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

Describe the changes
This PR adds ingress proof cache pruning based on expired anchors

Related Issue(s)

Checklist

  • Tests have been added/updated for the changes.
  • Documentation has been updated for the changes (if applicable).
  • The code follows Rust's style guidelines.

Additional Context

@antouhou antouhou changed the title Feat prune ingress proofs for real feat: make cache service prune expired ingress proofs from the cache Nov 24, 2025
@antouhou antouhou marked this pull request as ready for review November 24, 2025 22:06

@JesseTheRobot JesseTheRobot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, but I have some concerns about some logic in the new compute_promotion_status function & I would love to see some tests for this (though we can defer for now given the time constraints)

Comment thread crates/actors/src/mempool_service.rs Outdated
Comment thread crates/actors/src/mempool_service/ingress_proofs.rs
Comment thread crates/actors/src/promotion.rs Outdated
if !submit_txs_from_canonical.contains(&tx_header.id) {
let single_block = submit_tx_slice.iter().any(|h| h.id == tx_header.id);
if !single_block {
let previously_included = db

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tx headers are only inserted into the database when the block migrates - see the promotion validation logic used as part of block_validation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some discussions reverted back to the original logic

Comment thread crates/actors/src/promotion.rs Outdated

@JesseTheRobot JesseTheRobot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@antouhou antouhou merged commit 0ddd216 into master Nov 25, 2025
17 checks passed
@antouhou antouhou deleted the feat-prune-ingress-proofs-for-real branch November 25, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants