Skip to content

Deduplicate ESDTTransfer events only across shards - #1650

Merged
stefangutica merged 3 commits into
developmentfrom
esdt-transfer-events-dedup-by-shard
Oct 19, 2026
Merged

stefangutica merged 3 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: 86b9ca9

Metric Base Target Diff
AvgMax9095AvgMax9095AvgMax9095
Pool21.08265.7432.2935.0868.258215.46141.16169.59+223.68% 🔴+2991.50% 🔴+337.21% 🔴+383.48% 🔴
Nodes27.319267.9733.8336.34786.6123908.73155.26172.37+2779.85% 🔴+157.97% 🔴+358.91% 🔴+374.28% 🔴
Blocks25.29781.5333.0835.9292.067477.39175.88234.45+263.99% 🔴+856.76% 🔴+431.61% 🔴+552.75% 🔴
Mex21.10221.2332.2735.1367.107752.77149.79174.65+218.01% 🔴+3404.33% 🔴+364.14% 🔴+397.10% 🔴
Accounts21.62577.5432.4935.2867.617790.22144.01171.59+212.70% 🔴+1248.86% 🔴+343.19% 🔴+386.36% 🔴
Tokens21.07174.9232.2535.01136.408205.74128.30139.66+547.46% 🔴+4591.27% 🔴+297.85% 🔴+298.87% 🔴
Transactions31.4711627.8933.7636.39140.7221851.44123.02143.27+347.18% 🔴+87.92% 🔴+264.37% 🔴+293.68% 🔴
Test Run Duration60001.8660002.12

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

@stefangutica
stefangutica merged commit 6a71f4d into development Oct 19, 2026
6 checks passed
@stefangutica
stefangutica deleted the esdt-transfer-events-dedup-by-shard branch October 19, 2026 10:19
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.

3 participants