Repository navigation
fix(typewriter): pin settlements to the head's timestamp, not a block the watch is catching up on - #145
Closed
kyscott18 wants to merge 1 commit into
Closed
fix(typewriter): pin settlements to the head's timestamp, not a block the watch is catching up on#145kyscott18 wants to merge 1 commit into
kyscott18 wants to merge 1 commit into
Conversation
… the watch is catching up on A settlement must land within MAX_SETTLEMENT_DELAY (60s) of the timestamp it pins. The runtime pinned the timestamp of the block the watch was processing, which falls minutes behind the head after a pause or slow providers. Then every settlement executed during catch-up, including a resync's replays, reverted on landing and resynced again, with no error. The watch now carries the newest head's timestamp with each added block, and the runtime pins that. Seed 0x02 stalled on main in this loop and now passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes one of the two causes of the resync loop first reported in #137, which now fails seed 0x02 on main with no extra faults.
The bug:
MAX_SETTLEMENT_DELAY(60s) of the timestamp it pins. The runtime pinned the timestamp of the block the watch was processing.InvalidSettlementTimestamp, triggers another resync, and the cycle repeats. No error is ever raised.The fix:
lateston every poll, and now carries the newest head's timestamp on eachAddedmessage.Runs:
Not fixed — a second cause, slow signing:
slowRateset to 0 passes, both with and without this patch. So its failure comes from slow requests, not stale pinning.eth_fillTransaction. When requests take 5s timeouts or outages stall them, a backlog takes more than 60s to sign, so the tail misses the window it pinned at execution time.🤖 Generated with Claude Code