Skip to content

epic: activity tag write, re-attach and scoping fixes #133

Description

@jvsena42

Umbrella for three independent activity-tag fixes found while wiring hardware-wallet tag backup on Android (synonymdev/bitkit-android#1163, follow-up to #113). Each is filed separately and can land on its own; this issue only holds the shared context and the decisions taken against.

All findings were verified against v0.5.5 source and reproduced on regtest with the bitkit-docker Trezor emulator. The iOS port has not started, so fixing in Core avoids the same workaround being written twice.

Subtasks

Considered and not requested

Two changes were evaluated and deliberately rejected, recorded here so they are not re-proposed:

A separate pending/orphan tag table. pre_activity_metadata plus transfer_pre_activity_metadata_to_activity already implements park-and-auto-attach. It needs the precision fix in #135, not a parallel mechanism.

Unifying foreign keys across activity_tags, pre_activity_metadata and transaction_details. The current split is correct rather than accidental: activity-owned data (onchain_activity, lightning_activity, activity_tags) cascades from activities, while pre_activity_metadata exists before any activity by design and transaction_details is keyed (wallet_id, tx_id) as transaction-level data. Neither should be bound to an activity row.

A single transactional import entrypoint was also considered. Once #134 lands, its remaining value is ergonomic only, and the failure isolation it would provide belongs in the apps' own restore paths rather than in a Core API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions