-
Notifications
You must be signed in to change notification settings - Fork 92
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
New Feature: Adds the sync mode importer #1415
New Feature: Adds the sync mode importer #1415
Conversation
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.
Can you add a description to the PR also?
@@ -32,6 +32,11 @@ type algodImporter struct { | |||
cancel context.CancelFunc | |||
} | |||
|
|||
func (algodImp *algodImporter) OnComplete(input data.BlockData) error { | |||
_, err := algodImp.aclient.SetSyncRound(input.Round() + 1).Do(algodImp.ctx) |
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.
what if input.Round() is < current round in ledger? I think you would also need to call SetSyncRound in Init?
and does algod node need to have a large enough MaxAcctLookback
for indexer to import older rounds?
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 node will be required to have the delta in the cache. This means the indexer's round must be within MaxAcctLookback
of the node's round. The data node will set the sync round to the latest round on startup to make sure it doesn't get ahead of the indexer.
can we rebase this PR to develop instead of feature/sync-mode? |
0aabd10
to
38fcec9
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1415 +/- ##
===========================================
+ Coverage 65.05% 65.12% +0.06%
===========================================
Files 79 80 +1
Lines 11276 11373 +97
===========================================
+ Hits 7336 7407 +71
- Misses 3374 3394 +20
- Partials 566 572 +6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
aad98ac
to
8989f61
Compare
I have rebased this against develop |
go.mod
Outdated
@@ -8,6 +8,7 @@ require ( | |||
github.com/algorand/avm-abi v0.2.0 | |||
github.com/algorand/go-algorand v0.0.0-20220211161928-53b157beb10f | |||
github.com/algorand/go-algorand-sdk v1.22.1-0.20221209152459-223656f08456 |
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.
Do we still need v1?
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 don't think we do but I'd rather save that for another PR.
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.
Sure, sounds fine.
030889d
to
e6a184a
Compare
9cafdea
to
380e708
Compare
ae09ea0
to
487307f
Compare
e567fe7
to
f6e9bf0
Compare
Co-authored-by: Eric Warehime <[email protected]>
3dbea36
to
c72038c
Compare
Keeps all interfaces the same but adds specific request functionality to the algod importer.