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.
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.5source and reproduced on regtest with thebitkit-dockerTrezor emulator. The iOS port has not started, so fixing in Core avoids the same workaround being written twice.Subtasks
tx_idrather thanaddress. A reused receive address both discards sibling records on write and re-attaches to the wrong transaction on read..filter {}that silently decides what leaves the device.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_metadataplustransfer_pre_activity_metadata_to_activityalready implements park-and-auto-attach. It needs the precision fix in #135, not a parallel mechanism.Unifying foreign keys across
activity_tags,pre_activity_metadataandtransaction_details. The current split is correct rather than accidental: activity-owned data (onchain_activity,lightning_activity,activity_tags) cascades fromactivities, whilepre_activity_metadataexists before any activity by design andtransaction_detailsis 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.