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
Refactor blocks endpoint - Closes #4369 #4372
Refactor blocks endpoint - Closes #4369 #4372
Conversation
// Get 34 blocks with all data (joins) from provided block id | ||
// According to maximum payload of 58150 bytes per block with every transaction being a vote | ||
// Discounting maximum compression setting used in middleware | ||
// Maximum transport payload = 2000000 bytes |
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.
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.
Right now by default max payload size is 3048576
bytes
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.
@ishantiw can you elaborate on why is that? Thanks!
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.
Initially, we had maxPayloadLimit
around 2000000 bytes
but when we were syncing with this limit, there were some packets having size higher than this limit and it was not syncing after that as it was rejected. To support syncing until the current height we decided to increase it to keep it 3048576 bytes
~3mb.
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.
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.
I think since we change the syncing format on this branch, it should be better.
We need to check size of a block with full vote with 25 transactions.
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.
After taking with @shuse2 let's leave it to 34 blocks and discuss this in another spike issue
// Get 34 blocks with all data (joins) from provided block id | ||
// According to maximum payload of 58150 bytes per block with every transaction being a vote | ||
// Discounting maximum compression setting used in middleware | ||
// Maximum transport payload = 2000000 bytes |
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.
I think since we change the syncing format on this branch, it should be better.
We need to check size of a block with full vote with 25 transactions.
3600285
to
b916a15
Compare
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.
LGTM, just a few minor comments related to naming and comments
b916a15
to
0e6390e
Compare
c672641
to
f8a157d
Compare
f8a157d
to
bc7cb16
Compare
What was the problem?
Refer to #4369
How did I solve it?
getBlocksFromID
How to manually test it?
To do
Review checklist
blocks
endpoint to retrieve blocks from a peer #4369