chore(node/runtime): remove remaining runtime references in kona#2566
chore(node/runtime): remove remaining runtime references in kona#2566
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the remaining runtime-related code from the kona node sources, completing a cleanup effort that was apparently started in a previous PR. The changes eliminate the entire runtime module and its dependencies.
- Removes the runtime module including
RuntimeLoader,RuntimeConfig, andRuntimeLoaderError - Cleans up related dependencies and exports from the crate
- Updates feature flags to remove runtime-specific dependencies
Reviewed Changes
Copilot reviewed 6 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/node/sources/src/runtime/mod.rs | Removes the runtime module declaration and exports |
| crates/node/sources/src/runtime/loader.rs | Removes the RuntimeLoader implementation with L1 provider integration |
| crates/node/sources/src/runtime/error.rs | Removes the RuntimeLoaderError type definitions |
| crates/node/sources/src/runtime/config.rs | Removes the RuntimeConfig struct and Display implementation |
| crates/node/sources/src/lib.rs | Removes runtime module imports and re-exports |
| crates/node/sources/Cargo.toml | Removes unused dependencies and updates feature flags |
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
refcell
left a comment
There was a problem hiding this comment.
Yea this was separate from the RuntimeActor which it removed there - that's why this wasn't removed
| // First attempt to load the unsafe block signer from the runtime loader. | ||
| if let Some(url) = l1_rpc { | ||
| let mut loader = RuntimeLoader::new(url, Arc::new(config.clone())); | ||
| let runtime = loader.load_latest().await.map_err(|e| { | ||
| anyhow::anyhow!("Failed to load runtime: {} {:?}", e, std::error::Error::source(&e)) | ||
| })?; | ||
| return Ok(runtime.unsafe_block_signer_address); | ||
| } |
There was a problem hiding this comment.
This we can't do unfortunately. We must load the current value at startup. Could be done with a much-simplified RuntimeLoader though.
dc798bb to
c3d74b0
Compare
|
Claude finished @theochap's task —— View job Pull Request ReviewI've completed a thorough review of this PR that removes the remaining runtime references from the kona node. Here's my analysis: Todo List:
SummaryThis PR removes the entire Code Quality & Architecture✅ Positive aspects:
Critical Issue: Runtime Configuration Loading🚨 Major Concern - There's a fundamental issue with removing the runtime loader: What was removed:
Impact:
Reviewer's Valid Concern: Recommendations🔧 Suggested Approach:
Alternative minimal implementation: // Keep only essential loading functionality
pub struct MinimalRuntimeLoader {
provider: AlloyChainProvider,
config: Arc<RollupConfig>,
}
impl MinimalRuntimeLoader {
pub async fn load_unsafe_block_signer(&self) -> Result<Address, RuntimeLoaderError> {
// Only load the unsafe block signer at startup
// Remove caching, metrics, and other complexity
}
}Performance & SecurityPerformance: ✅ The removal improves startup time and reduces complexity Test CoverageIssue: The removal eliminates test coverage for runtime loading functionality. While the online test was removed, there's no replacement verification that configuration loading works correctly. Final Recommendation❌ Request Changes - This PR should not be merged as-is because:
Suggested path forward:
The cleanup goal is good, but we need to preserve the essential runtime configuration loading capability. |
c3d74b0 to
3bbc9ea
Compare
|
Claude finished @theochap's task —— View job Pull Request ReviewI've completed my review of this PR that removes remaining runtime references from the kona node. Here are my findings: ✅ Overall AssessmentThis PR successfully removes most runtime-related code from the node sources, cleaning up the codebase by eliminating the runtime module and its dependencies. The changes are well-focused and align with the cleanup effort mentioned in the description. 🚨 Critical Issues Found1. Unused Import (Line 18)
2. Missing Functionality for Unsafe Block Signer
Impact: This could cause nodes to reject valid unsafe blocks if the unsafe block signer has been updated on-chain but the node is using an outdated value from genesis/CLI. 📋 Code Quality Issues3. Function Signature Inconsistencies 4. Dependency Cleanup
🔧 Recommendations
🛡️ Security Considerations
⚡ Performance Impact✅ Positive: Removing runtime loading reduces startup complexity and dependencies 🧪 Test CoverageThe existing tests appear adequate for the remaining functionality, though testing the unsafe block signer fallback behavior would be valuable. Summary: This PR needs the import fix and a decision on how to handle dynamic unsafe block signer loading before it can be safely merged. |
3bbc9ea to
0fed833
Compare
|
Claude finished @theochap's task —— View job Pull Request ReviewI've completed a thorough review of this PR that removes the remaining runtime references from the kona node. Here's my analysis: Todo List:
SummaryThis PR removes the entire Code Quality & Architecture✅ Positive aspects:
Critical Issue: Runtime Configuration Loading🚨 Major Concern - There's a fundamental issue with removing the runtime loader: What was removed:
Impact:
Reviewer's Valid Concern: Recommendations🔧 Suggested Approach:
Alternative minimal implementation: // Keep only essential loading functionality
pub struct MinimalRuntimeLoader {
provider: AlloyChainProvider,
config: Arc<RollupConfig>,
}
impl MinimalRuntimeLoader {
pub async fn load_unsafe_block_signer(&self) -> Result<Address, RuntimeLoaderError> {
// Only load the unsafe block signer at startup
// Remove caching, metrics, and other complexity
}
}Performance & SecurityPerformance: ✅ The removal improves startup time and reduces complexity Test CoverageIssue: The removal eliminates test coverage for runtime loading functionality. While the online test was removed, there's no replacement verification that configuration loading works correctly. Final Recommendation❌ Request Changes - This PR should not be merged as-is because:
Suggested path forward:
The cleanup goal is good, but we need to preserve the essential runtime configuration loading capability. |
…rs/kona#2566) ## Description It seems the AI has missed some references in op-rs/kona#2535. Removes the remaining runtime libraries in the node.
…rs/kona#2566) ## Description It seems the AI has missed some references in op-rs/kona#2535. Removes the remaining runtime libraries in the node.
Description
It seems the AI has missed some references in #2535. Removes the remaining runtime libraries in the node.