feat(node/service): L1OriginSelector advancement#2404
Conversation
| let l1_origin = match self.origin_selector.next_l1_origin(unsafe_head).await { | ||
| Ok(l1_origin) => l1_origin, | ||
| Err(err) => { | ||
| warn!( | ||
| target: "sequencer", | ||
| ?err, | ||
| "Temporary error occurred while selecting next L1 origin. Re-attempting on next tick." | ||
| ); | ||
| return Ok(()) | ||
| } | ||
| }; |
There was a problem hiding this comment.
Note that we don't really make a difference between what errors returned by the L1 origin selector are temporary vs. which aren't. The sequencer should always assume that transient RPC errors will recover.
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
55d4dc4 to
c7ac4ba
Compare
| if next_l1_origin_available { current_epoch + 1 } else { current_epoch }; | ||
| assert_eq!(next.hash, B256::with_last_byte(expected_epoch as u8)); | ||
| assert_eq!(next.number, expected_epoch); | ||
| } |
There was a problem hiding this comment.
These tests are really great and I think we could get pretty high returns on having a few data structures like the MockOriginSelectorProvider in a common test crate to reuse to test the remaining actors
## Overview Adds in the logic for the `L1OriginSelector` to optimistically advance the origin based on the latest L1 block number, while allowing for transient failures to be retried. Also adds testing for the selector logic.
c7ac4ba to
2ab4204
Compare
## Overview Adds in the logic for the `L1OriginSelector` to optimistically advance the origin based on the latest L1 block number, while allowing for transient failures to be retried. Also adds testing for the selector logic. closes op-rs/kona#2245
## Overview Adds in the logic for the `L1OriginSelector` to optimistically advance the origin based on the latest L1 block number, while allowing for transient failures to be retried. Also adds testing for the selector logic. closes #2245
Overview
Adds in the logic for the
L1OriginSelectorto optimistically advance the origin based on the latest L1 block number, while allowing for transient failures to be retried.Also adds testing for the selector logic.
closes #2245