Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spend transaction change outputs even if undelivered proof(s) #1074

Merged
merged 8 commits into from
Aug 14, 2024

Commits on Aug 13, 2024

  1. tapdb: generalise QueryAssetTransfers arg flag unconf_only

    This commit renames and generalizes the `unconf_only` argument in the
    `QueryAssetTransfers` SQL query to `pending_transfers_only`. The flag
    now returns pending transfers with unconfirmed anchoring transactions or
    undelivered transfer output proofs.
    
    Additionally, this update includes the anchor transaction block hash in
    the query's returned values. This allows users to determine if a
    transfer's anchoring transaction has been confirmed on-chain, providing
    context for why the transfer is pending.
    
    As a result of this change, ExportLog.PendingParcels will now also
    include transfers that are pending due to undelivered proofs, even if
    their associated anchoring transactions have already been confirmed
    on-chain.
    ffranr committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    5890fcd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ef90f31 View commit details
    Browse the repository at this point in the history
  3. tapfreighter: store package anchor tx conf state before proof transfer

    This commit modifies the `ChainPorter` state machine to store the
    package state after the anchor transaction is confirmed, but before
    proof transfer is initiated.
    
    By ensuring the state is saved at this point, transfer change output
    coins remain spendable even if proof delivery fails.
    ffranr committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    4d504a0 View commit details
    Browse the repository at this point in the history
  4. tapfreighter: rename ChainPorter state to SendStateStorePostAnchorTxConf

    This commit renames the ChainPorter state from SendStateStoreProofs to
    SendStateStorePostAnchorTxConf. The new name more accurately represents
    its function, reflecting that this state now performs broader storage
    updates beyond just storing proofs. Additionally, the name indicates
    that this state is triggered after the confirmation of the transfer
    anchoring transaction on-chain, without delving into the specific
    details of the operations performed within the state.
    ffranr committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    093f9b7 View commit details
    Browse the repository at this point in the history
  5. tapfreighter+tapdb: rename ConfirmParcelDelivery to LogAnchorTxConfirm

    This commit renames the ExportLog method from ConfirmParcelDelivery to
    LogAnchorTxConfirm. The purpose of this change is to clarify that the
    method does not confirm parcel delivery to disk, as transfer proofs may
    still be pending. Instead, it updates the send package on disk to
    indicate that the transfer anchoring transaction has been confirmed
    on-chain.
    ffranr committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    ef4011a View commit details
    Browse the repository at this point in the history
  6. taprpc: add file anchor tx block hash to AssetTransfer

    This commit introduces the anchor transaction block hash as a field in
    the `AssetTransfer` RPC message. The `ListTransfers` RPC endpoint now
    includes this block hash for each asset transfer, provided the anchor
    transaction is confirmed. If the transaction is unconfirmed, this field
    will remain unset.
    ffranr committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    9946cac View commit details
    Browse the repository at this point in the history
  7. taprpc: add proof delivery status field to RPC TransferOutput message

    This commit enhances the ListTransfers RPC endpoint by adding the proof
    delivery status for each transfer output in its response.
    ffranr committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    99daf3d View commit details
    Browse the repository at this point in the history
  8. itest: spend change on failed proof delivery

    This commit adds an itest which ensures that a tapd node is able to
    spend a change output even if the proof transfer for the previous
    transaction fails.
    ffranr committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    6f0f23f View commit details
    Browse the repository at this point in the history