Fix try_locate_tx_by_* functions#51
Open
jdziworski-bc wants to merge 4 commits intotoncenter:mainfrom
Open
Conversation
try_locate_tx_by_incoming_message block search rangetry_locate_tx_by_* functions
jdziworski-bc
commented
Dec 14, 2023
|
|
||
| for shard_data in shards['shards']: | ||
| shardchain = shard_data['shard'] | ||
| for b in range(3): |
Author
There was a problem hiding this comment.
3 was not enough for some cases and transaction wouldn't be found. Increased to 10.
Collaborator
There was a problem hiding this comment.
Hi @jdziworski-bc, thank you for your PR. I think there are these points to consider:
- Usually the distance of blocks with out_tx and in_tx becomes > 3 when the network experiences a high load and the message queue contains many entries. In that case, the distance might be even greater than 10.
- Under high load the network splits into shards.
- Under high load lite servers are usually busy and response time increases significantly.
Let's say the network has 10 shards, for each shard we lookup + read transactions of 10 blocks. In total, it results in 200 requests to the lite server in the worst case. It is not the desired outcome in toncenter.com/api/v2 because it puts an additional load on liteservers.
As an option, I suggest adding the parameter scan_blocks_count with default value 3 and you can adjust it for your use case. Would it work for you?
jdziworski-bc
commented
Dec 14, 2023
jdziworski-bc
commented
Dec 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.