Repository navigation
Conversation
When the node refuses a claim's stored transaction, for example because its fee cap is below the base fee, the sender re-signs the claim at the same nonce with the configured fees, persists it, and broadcasts it. Every hash signed for a claim is kept in a new claim_txs table, and a receipt for any of them settles the claim.
There was a problem hiding this comment.
When the node refuses a claim's stored transaction, the sender now re-signs the claim at the same nonce with the current fees. A new claim_txs table, filled by a versioned migration, records every hash signed for a claim, and a successful receipt for any of them settles it. Nothing blocks: the remaining issues are narrow edge cases in which a claim can be marked failed after it was paid or can stay stuck. Both codex findings held up and are kept as suggestions; the Go toolchain was not available, so the tests were not run.
Non-blocking
4 findings on the changed lines, as inline comments.
seidroid review · decision approve · session b332e398fc1b48daa4d242aed2ece05d · turn resp_claude_65bc93f6ceca0ce5bab708b6cc2bd2b9 · item e0f689bfa0455577904b06b6c5c50adf
Findings: 0 blocking | 4 non-blocking | 4 posted inline
A failed receipt for the latest transaction no longer fails the claim while an earlier one can still land: resync spends the nonce and reconcile settles it. Re-signing back to an earlier hash is idempotent, Resign restarts the sent time, and receipts also check the claim's current hash.
|
@seidroid review |
There was a problem hiding this comment.
Commit 61feac0 fixes all four earlier findings: a failed latest receipt now leads to a nonce fill and a later reconcile instead of failing the claim, re-signing back to an earlier hash is idempotent, Resign resets sent_at, and receipt() always checks the claim's current hash, so those threads are resolved. Nothing blocks. Codex's one new finding held up and is kept as a suggestion: Resign loses the original hash of a claim that has no claim_txs history. The Go toolchain was not available, so the tests were not run.
Non-blocking
1 finding on the changed lines, as inline comments.
1 nit, not posted on the code
internal/sender/sender.go:277— Until the fill is mined, confirm sees the same failed receipt on every step and requests another resync. That resync sends the identical fill again, and fill does not tolerate an alreadyHave error, so resync fails and the step skips dispatch and confirm until the nonce is spent. Treating alreadyHave as success in fill would keep the queue moving.
seidroid review · decision approve · session b332e398fc1b48daa4d242aed2ece05d · turn resp_claude_2d06534d58ffa5a71634248b0257ff43 · item f7dea528c89c5666b07726555a1a32bf
Findings: 0 blocking | 1 non-blocking | 1 posted inline
|
@seidroid review |
There was a problem hiding this comment.
Commit 3654a29 fixes the last open finding: before Resign overwrites a claim's tx_hash, the same transaction now copies the current hash into claim_txs (skipping it if already there), so a claim sent without hash history keeps its original hash, and that thread is resolved. Nothing blocks; the fill nit from the last round still applies, codex found nothing this round, and the Go toolchain was not available, so the tests were not run.
1 nit, not posted on the code
internal/sender/sender.go:277— Until the fill is mined, confirm sees the same failed receipt on every step and requests another resync. That resync sends the identical fill again, and fill does not tolerate an alreadyHave error, so resync fails and the step skips dispatch and confirm until the nonce is spent. Treating alreadyHave as success in fill would keep the queue moving.
seidroid review · decision approve · session b332e398fc1b48daa4d242aed2ece05d · turn resp_claude_b53f4ce711276972bcaac41c2e62ee8b · item ae3ec559c9b758399508a10511b5e833
Findings: 0 blocking | 0 non-blocking | 0 posted inline
|
The fill nit from review 5996057274 is fixed in 37ee449: fill now treats an alreadyHave error as sent, so a resync that resends an identical pending fill no longer fails and the queue keeps moving. TestFillAlreadyPendingKeepsResyncing fails without the fix. |
A claim keeps the nonce it was signed at, and resync only rebroadcast its stored transaction. If the node never admitted that transaction, for example because its fee cap fell below the base fee, the nonce stayed unspent and every later transfer stalled behind it. Raising the fee caps did not help, since the transaction was already signed.
Now, when the node refuses a stored transaction, the sender re-signs the claim at the same nonce with the configured fees, persists it, and broadcasts it. A new migration adds a claim_txs table that keeps every hash signed for a claim, backfilled from the claims already sent and topped up with the hash a re-sign replaces in case an older binary sent it, and the sender checks all of them along with the claim's current hash: a successful receipt for any of them settles the claim, so an old transaction that lands after the re-sign still confirms it exactly once. Because an earlier transaction can still land after a later one fails, a failed receipt settles the claim only once its nonce is spent: resync fills the nonce and reconcile decides. The store now applies migrations in order, tracked by SQLite's user_version.
Fixes PLT-1634.