-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: exchange: change GetBlocks to always fetch the requested number of tipsets #11565
Conversation
} | ||
|
||
return validRes.toFullTipSets()[0], nil | ||
// If `doRequest` didn't fail we are guaranteed to have at least |
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.
This was true, but I still see no reason not to check this.
// tipset *backwards*, returning as many tipsets as the count parameter, | ||
// or less. | ||
// tipset *backwards*, returning as many tipsets as the count parameter. | ||
// The ONLY case in which we return fewer than `count` tipsets is if we hit genesis. | ||
GetBlocks(ctx context.Context, tsk types.TipSetKey, count int) ([]*types.TipSet, error) | ||
|
||
// GetChainMessages fetches messages from the network, starting from the first provided tipset |
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.
Note that we are NOT changing GetChainMessages
behaviour -- it might still return fewer than count
epochs worth of messages.
feat: exchange: change GetBlocks to always fetch the requested number of tipsets
feat: exchange: change GetBlocks to always fetch the requested number of tipsets
…arden-sync feat: exchange: change GetBlocks to always fetch the requested number of tipsets
Related Issues
Fixes #11529
Proposed Changes
Change
GetBlocks
to always returncount
tipsets, unless we hit genesis. Partial responses are treated as correct, but the exchanger will still request more tipsets (instead of returning fewer than requested tipsets to the caller).Additional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps