Skip to content

fix(bridge): reset expiry timer on re-proposal after burn/refund expiry#1081

Merged
sameh-farouk merged 4 commits into
developmentfrom
fix/bridge-pallet-block-reset
Jun 1, 2026
Merged

fix(bridge): reset expiry timer on re-proposal after burn/refund expiry#1081
sameh-farouk merged 4 commits into
developmentfrom
fix/bridge-pallet-block-reset

Conversation

@sameh-farouk
Copy link
Copy Markdown
Member

Summary

  • Reset tx.block to current block when the first signature is added after an expiry, preventing immediate re-expiry by on_finalize
  • Remove dead code in propose_stellar_burn_transaction_or_add_sig where a redundant contains_key check made the block-update branch unreachable

Closes #1080

sameh-farouk and others added 2 commits March 9, 2026 21:26
…expiry

After on_finalize expires a burn or refund transaction, re-proposals add
signatures via add_stellar_sig_burn_transaction / add_stellar_sig_refund_transaction
but tx.block was never updated. This caused on_finalize to immediately
re-expire the transaction in the same block the new signature was added
(since current_block - old_block >= RetryInterval was still true).

Also removes dead code in propose_stellar_burn_transaction_or_add_sig where
a redundant contains_key check made the block-update branch unreachable.

Closes #1080

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sameh-farouk sameh-farouk marked this pull request as ready for review April 7, 2026 10:11
@sameh-farouk sameh-farouk requested a review from LeeSmet as a code owner April 7, 2026 10:11
sameh-farouk and others added 2 commits June 1, 2026 16:34
Cover the scenario the existing suite missed: a first signature added when
current_block - tx.block has again reached RetryInterval must reset tx.block
so on_finalize (which runs after extrinsics in the same block) does not wipe
the signature immediately.

Both tests fail without the fix (tx.block is not reset) and pass with it:
- burn_signature_after_expiry_resets_block_and_survives
- refund_signature_after_expiry_resets_block_and_survives

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…flow (#1091)

The repository rename (tfchain -> ledger_chain) changed the runner checkout
path to /__w/ledger_chain/ledger_chain, but the safe.directory exception was
hardcoded to /__w/tfchain/tfchain, so git still rejected the repo with
"detected dubious ownership" (exit 128) at the Git config step.

Use $GITHUB_WORKSPACE so the exception always matches the real checkout path,
regardless of repository name.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sameh-farouk sameh-farouk merged commit 6375d96 into development Jun 1, 2026
1 of 2 checks 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.

pallet-tft-bridge: expired burns/refunds never reset block on re-proposal (dead code)

1 participant