Skip to content

feat(rpki): add RPKISPOOL historical source#141

Merged
digizeph merged 3 commits into
mainfrom
feat/rpki-rpkispools-source
Jul 17, 2026
Merged

feat(rpki): add RPKISPOOL historical source#141
digizeph merged 3 commits into
mainfrom
feat/rpki-rpkispools-source

Conversation

@digizeph

@digizeph digizeph commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Add RPKISPOOL historical ROA and ASPA loading via bgpkit-commons.
  • Make rpkispools with the Sobornost mirror the default for dated CLI queries.
  • Retain RIPE and RPKIViews options, including RPKIViews-only Massars.
  • Reject invalid historical sources and source/collector combinations with a nonzero exit status.
  • Update existing parse output formatting for current Clippy compatibility.

Validation

  • cargo fmt --check
  • cargo clippy --all-features -- -D warnings
  • cargo test --all-features — 272 passed, 1 ignored; 13 CLI unit tests; 1 CLI integration test; 9 doc tests passed.
  • Live rpki aspas --date 2026-06-28 --format json: 2,208 ASPA records from RPKISPOOL/Sobornost in 17 seconds.
  • Live RPKISPOOL/ATTN verification: 2,208 ASPA records in 19 seconds.

Closes #134

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds support for loading historical RPKI data from the new RPKISPOOL source (via bgpkit-commons) and updates the CLI defaults so dated rpki roas / rpki aspas queries use RPKISPOOL (Sobornost mirror) by default, while still supporting RIPE and RPKIViews and rejecting invalid source/collector combinations.

Changes:

  • Added RpkiSpools as a historical data source and wired it through the RPKI lens’ historical loading path.
  • Implemented RPKISPOOL collector parsing and made rpkispools the default historical source when a date is specified.
  • Updated CLI flags to default to --source rpkispools for dated queries and made --collector optional.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/lens/rpki/mod.rs Adds the new RpkiSpools source and maps it into the historical loader plumbing.
src/lens/rpki/commons.rs Extends bgpkit-commons integration to parse RPKISPOOL collectors/sources and defaults historical loads to RPKISPOOL.
src/bin/commands/rpki.rs Updates CLI defaults/args for dated queries and adds validation for unknown sources/collectors.
CHANGELOG.md Documents the new default historical source and behavior changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lens/rpki/mod.rs Outdated
Comment on lines 61 to 64
/// Historical collector options
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[cfg_attr(feature = "cli", derive(clap::ValueEnum))]
pub enum RpkiViewsCollectorOption {
Comment thread src/bin/commands/rpki.rs
Comment on lines +423 to +426
_ => Err(format!(
"Unknown historical RPKI source '{}'. Valid options: rpkispools, ripe, rpkiviews",
source
)),
Comment thread src/bin/commands/rpki.rs
Comment on lines +455 to +458
_ => Err(format!(
"Unknown historical RPKI collector '{}'. Valid options: sobornost, attn, kerfuffle; massars is only available with rpkiviews",
collector
)),
Comment thread src/bin/commands/rpki.rs
Comment on lines +435 to +439
fn test_parse_rpkispools_data_source() {
assert!(matches!(
parse_data_source("rpkispools").unwrap(),
RpkiDataSource::RpkiSpools
));
Comment thread src/lens/rpki/commons.rs
Comment on lines 305 to 308
assert!(matches!(
parse_historical_source("ripe", None).unwrap(),
HistoricalRpkiSource::Ripe
));
@digizeph
digizeph merged commit 42e09f0 into main Jul 17, 2026
1 check passed
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.

RPKI ASPA historical using RPKIViews is slow

2 participants