Core — Synchronizer Test Cases
Derived from FSD Use Cases (v0 — expand when Doc05 Excel exists)
A. Document controlA. Kiểm soát tài liệu
B. Version historyB. Lịch sử phiên bản
| Version |
Date |
Author |
ChangesThay đổi |
| 1.0 |
01/12/2026 |
Khoa Trinh |
Version 1.0 |
C. Table of contentsC. Mục lục
D. ContentD. Nội dung
Index
| Test ID |
Test name |
BR |
UC |
Category |
| SYNC-001 |
Watched TRON address; transfer in solidified block |
— |
UC-DEP-01 |
Function |
| SYNC-001 |
Prior successful credit for same reference |
— |
UC-IDM-01 |
Function |
| SYNC-001 |
Transfer seen before finality |
— |
UC-UX-01 |
Function |
| SYNC-001 |
Running on provider A |
— |
UC-PRV-01 |
Function |
| SYNC-001 |
Outage created block gap |
— |
UC-GAP-01 |
Function |
| SYNC-001 |
Phase 2; deposit credited; chain reorg removes tx |
— |
UC-REORG-01 |
Function |
| SYNC-001 |
Transfer to unknown address |
— |
UC-MAP-01 |
Function |
| SYNC-001 |
Fixture contains logs, internal transfers, batch items, failed txs, and self-transfer |
— |
UC-IDN-01 |
Function |
| SYNC-001 |
Previously final/credited EVM occurrence becomes non-canonical |
— |
UC-DEEP-01 |
Function |
| SYNC-001 |
TRON internal transfer support enabled |
— |
UC-INT-01 |
Function |
| SYNC-001 |
Ledger throttles or is unavailable |
— |
UC-BKP-01 |
Function |
| SYNC-002 |
Primary interrupted mid-scan |
— |
UC-PRV-02 |
Function |
| SYNC-003 |
Primary/backup disagree on block or receipt |
— |
UC-PRV-03 |
Function |
Test cases
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-DEP-01 |
| Test name |
Watched TRON address; transfer in solidified block |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Scan → match → deposit_detected |
| Expected result |
Observation credited; VA += amount; one ledger tx |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-IDM-01 |
| Test name |
Prior successful credit for same reference |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Replay scan / credit |
| Expected result |
Idempotent hit; no second credit |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-UX-01 |
| Test name |
Transfer seen before finality |
| Preconditions |
sync / portal |
| Data |
— |
| Steps |
Set ingested_confirming; do not call ledger credit |
| Expected result |
UX shows confirming; withdrawable unchanged |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-PRV-01 |
| Test name |
Running on provider A |
| Preconditions |
ops |
| Data |
— |
| Steps |
Change config to provider B only; restart or hot-reload |
| Expected result |
Continues from cursor; no code change |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-GAP-01 |
| Test name |
Outage created block gap |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Catch-up scan + reconcile |
| Expected result |
Gap filled; credits posted once |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-REORG-01 |
| Test name |
Phase 2; deposit credited; chain reorg removes tx |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Detect reorg → ledger revert → reorged |
| Expected result |
Balance reversed; audit complete; no double-credit on replacement |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-MAP-01 |
| Test name |
Transfer to unknown address |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Local filter drop |
| Expected result |
Status ignored or no row; no ledger call |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-IDN-01 |
| Test name |
Fixture contains logs, internal transfers, batch items, failed txs, and self-transfer |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Parse and classify using mechanism matrix |
| Expected result |
Stable occurrence IDs; only valid external deposits credit |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-DEEP-01 |
| Test name |
Previously final/credited EVM occurrence becomes non-canonical |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Freeze scope; preserve evidence; request ledger revert |
| Expected result |
Balance reversed and incident trace complete |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-INT-01 |
| Test name |
TRON internal transfer support enabled |
| Preconditions |
ops/sync |
| Data |
— |
| Steps |
Verify provider capability and parity |
| Expected result |
Mechanism enabled only after parity pass |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-001
| Field |
Value |
| Test ID |
SYNC-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-BKP-01 |
| Test name |
Ledger throttles or is unavailable |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Persist tasks; stop safe cursor advancement; retry same reference |
| Expected result |
Zero lost observations; one ledger credit |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-002
| Field |
Value |
| Test ID |
SYNC-002 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-PRV-02 |
| Test name |
Primary interrupted mid-scan |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Auto failover to backup |
| Expected result |
No lost solidified deposits; no duplicate credits |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
SYNC-003
| Field |
Value |
| Test ID |
SYNC-003 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-PRV-03 |
| Test name |
Primary/backup disagree on block or receipt |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Compare/quorum/escalate |
| Expected result |
No credit until resolved; evidence retained |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
E. ReferencesE. Tham chiếu