Skip to content

Deduplicate ESDTTransfer events only across shards - #1650

Open
stefangutica wants to merge 2 commits into
developmentfrom
esdt-transfer-events-dedup-by-shard
Open

stefangutica wants to merge 2 commits into
developmentfrom
esdt-transfer-events-dedup-by-shard

Conversation

@stefangutica

Copy link
Copy Markdown
Collaborator

Reasoning

  • removeDuplicatedESDTTransferEvents dropped every ESDTTransfer event with identical content, including legitimate repeats emitted on the same shard. For example, 9a4e275b6a272431e324da6011fbe87715214f82407b269a25e26032bdd25bcd has 4 SCRs and 4 ESDTTransfer events, two identical pairs on shard 1. The API returned only 2 events and 2 token operations.
  • The duplicate it was meant to remove ( fix ESDTTransfer duplicated events #1526) is the same transfer emitted on both the source and the destination shard under the same txHash.

Proposed Changes

  • Added shardID to the log events. It is now exposed as logs.events[].shardID.
  • An ESDTTransfer event is dropped only when an identical one was already seen on a different shard. Repeats on the same shard are kept.

How to test

  • GET /transactions/9a4e275b6a272431e324da6011fbe87715214f82407b269a25e26032bdd25bcd returns 4 ESDTTransfer events in logs and 4 WEGLD transfers in operations.
  • GET /transactions/38b1e7163db09950d24fc015b74a129017694f51d20a5053fbc14d2a2dcee97f (cross-shard) still returns the initial ZPAY transfer once, from shard 0.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

k6 load testing comparison.
Base Commit Hash: b40c3c4
Target Commit Hash: 7a3c881

Metric Base Target Diff
AvgMax9095AvgMax9095AvgMax9095
Accounts64.55793.41132.33221.9959.791317.85110.38232.37-7.38% ✅+66.10% 🔴-16.59% ✅+4.68% 🔴
Mex61.33540.20129.86208.9657.08656.11129.16199.38-6.93% ✅+21.46% 🔴-0.54% ✅-4.58% ✅
Nodes357.8027677.26154.19162.96481.9727933.87147.82161.92+34.70% 🔴+0.93% 🔴-4.13% ✅-0.64% ✅
Blocks86.601266.62194.34276.2583.101610.08208.55271.19-4.04% ✅+27.12% 🔴+7.31% 🔴-1.83% ✅
Transactions147.7525688.37105.43140.28137.8826731.32124.87137.24-6.68% ✅+4.06% 🔴+18.44% 🔴-2.17% ✅
Pool62.55938.65132.38208.5257.24843.21131.74198.17-8.49% ✅-10.17% ✅-0.49% ✅-4.96% ✅
Tokens97.942035.66149.54161.08107.551729.01138.59152.04+9.81% 🔴-15.06% ✅-7.33% ✅-5.61% ✅
Test Run Duration60002.6960004.81

Legend: Avg - Average Response Time, Max - Maximum Response Time, 90 - 90th Percentile, 95 - 95th Percentile
All times are in milliseconds.

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.

1 participant