-
Notifications
You must be signed in to change notification settings - Fork 220
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
feat!: add paging to utxo stream request #5302
feat!: add paging to utxo stream request #5302
Conversation
This is an alternative to PR #5298 The issue we have is that the Genesis block has too many utxos to send over the wire with the 4mb size limit. |
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.
utACK
// Ensure task stops if the peer prematurely stops their RPC session | ||
if tx.send(Ok(utxo_block_response)).await.is_err() { | ||
break; | ||
for utxo_chunk in utxos.chunks(2000) { |
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.
We can safely increase this number to 4000 as 5526 UTXOs in the faucet takes up approximately 4.5924 MiB. Thus (4000 / 5526) x 4.5924 = 3.3242 MiB.
fa0746c
to
f413b89
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.
utACK
Please see comment about for utxo_chunk in utxos.chunks(2000)
## [0.50.0-pre.0](v0.49.0-pre.6...v0.50.0-pre.0) (2023-04-12) ### ⚠ BREAKING CHANGES * add paging to utxo stream request (5302) ### Features * add extended mask recovery ([5301](#5301)) ([23d882e](23d882e)) * add network name to data path and --network flag to the miners ([5291](#5291)) ([1f04beb](1f04beb)) * add other code template types ([5242](#5242)) ([93e5e85](93e5e85)) * add paging to utxo stream request ([5302](#5302)) ([3540309](3540309)) * add wallet daemon config ([5311](#5311)) ([30419cf](30419cf)) * define different network defaults for bins ([5307](#5307)) ([2f5d498](2f5d498)) * feature gates ([5287](#5287)) ([72c19dc](72c19dc)) * fix rpc transaction conversion ([5304](#5304)) ([344040a](344040a))
Description
Adds paging to the utxo stream to handle the large amount of faucet utxos
Motivation and Context
See: #5299
How Has This Been Tested?
unit tests
Fixes: #5299
What process can a PR reviewer use to test or verify this change?
See PR #5298
Breaking Changes
Changes request service