-
Notifications
You must be signed in to change notification settings - Fork 135
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
[syncer/storage] Pre-store Blocks #269
Conversation
Pull Request Test Coverage Report for Build 13474
💛 - Coveralls |
@@ -38,8 +38,7 @@ lint-examples: | |||
golangci-lint run -v -E ${LINT_SETTINGS} | |||
|
|||
lint: | lint-examples | |||
golangci-lint run --timeout 2m0s -v -E ${LINT_SETTINGS},gomnd && \ | |||
make check-comments; | |||
golangci-lint run --timeout 2m0s -v -E ${LINT_SETTINGS},gomnd |
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.
the double context.Context
in sequenceBlocks
causes a linting issue that can't be bypassed 😢
|
||
func (s *Syncer) sequenceBlocks( // nolint:golint | ||
ctx context.Context, | ||
pipelineCtx context.Context, |
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 is needed to spawn up more fetcher threads.
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
1502917
to
d571721
Compare
d571721
to
9aca901
Compare
To increase sync speed, we modified the
storage/modules
package to pre-store block data before it is sequenced (which can be done concurrently). This significantly reduces the amount of work that must be done serially (i.e. updating balances, updating coins, etc).WARNING: THIS PR INCLUDES BREAKING CHANGES TO
STORAGE
! YOU MUST RESYNC ANY DATA STORED USING PREVIOUS RELEASES!Changes
syncer
(instead of waiting to store until blocks are sequenced)accountEntry
with*types.AccountCurrency
*types.AccountCurrency
ctx
changes insyncer
do not introduce regression inrosetta-cli
syncer
tests to handleBlockSeen
runtime.NumCPU
(tend to be more intensive than fetch calls so allow for separate configuration)SeenConcurrency
)Future Work
rosetta-cli
to determineSeeBlock
concurrency