New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix duplicated txs into tx pool api response #4424
Conversation
… with id = shard_otherShard as they point to the same one
|
||
txs := txCache.GetTransactionsPoolForSender(sender) | ||
txsForSender = append(txsForSender, txs...) | ||
cacheId := process.ShardCacherIdentifier(senderShard, senderShard) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this will work despite the fact that a transaction might be cross shard? On both nodes: sender & destination?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, as verified with @andreibancioiu and can be seen here, no matter the destination shard, there will always be returned the source id.
the problem was observed on a transaction from shard 0 to shard 1, when the same transaction was returned 4 times from a shard 0 observer.
also, @gabi-vuls confirmed that testing was made with cross shard txs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System test passed.
Description of the reasoning behind the pull request (what feature was missing / how the problem was manifesting itself / what was the motive behind the refactoring)
/transaction/pool?by-sender=erd1...
asShardDataStore
returns the same data storer for all ids "0", "0_1", "0_2", "0_META"Proposed Changes
sourceShard_destinationShard
as they all point to the same one, leading to duplicatesTesting procedure
/transaction/pool
on the observer from the shard you sent txsf and copy a sender address)/transaction/pool?by-sender=sender_addr_from_above_point
on either proxy or intra shard observer, tyou should not the duplicates among tx hashes received in response