-
Notifications
You must be signed in to change notification settings - Fork 26
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
algod importer: Auto catchpoint label lookup. #65
Conversation
Codecov Report
@@ Coverage Diff @@
## master #65 +/- ##
==========================================
+ Coverage 67.66% 69.45% +1.79%
==========================================
Files 32 33 +1
Lines 1976 2118 +142
==========================================
+ Hits 1337 1471 +134
+ Misses 570 569 -1
- Partials 69 78 +9
📣 We’re building smart automated test selection to slash your CI/CD build times. 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.
Still reading but it's a good juncture to submit some feedback.
# testnet: https://algorand-catchpoints.s3.us-east-2.amazonaws.com/consolidated/testnet_catchpoints.txt | ||
# Automatically download an appropriate catchpoint label. If false, you | ||
# must specify a catchpoint to use fast catchup. | ||
auto: false |
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.
Given the language of the algod importer plugin's README, auto
is a bit confusing.
It says:
If ... the plugin will automatically run fast catchup on startup if the node is behind the current pipeline round
So to me, "auto" seems redundant, though clearly it isn't.
- I see two approaches. Remove "automatically" from the README
- Rename
auto
to something else likelatest-available
, orlatest
, orpipeline-latest
, or something like that.
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.
Good point. Which approach would you recommend? I updated the readme to clarify what was being done automatically. But maybe the setting name could also be clearer?
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
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.
To answer your question, I'm leaning towards just modding the README. auto
is a sensible name (or the opposite manual
as well)
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.
And to answer my own question, the following script seems to work. So yeah, you do need to call sync
before starting conduit:
%%bash
export DATA_NODE=follower
just stop_and_nuke || true
just pub-create conduit mainnet
just start
just algod /v2/ledger/sync/26589217 POST
just algod /v2/ledger/sync
../cmd/conduit/conduit -d ./data --next-round-override 26589217
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.
Sorry for the confusion. I've figured out the problem. You need the changes in go-algorand#5349. Without them you run into this error: https://github.com/algorand/go-algorand/pull/5349/files#r1185050820
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.
Hmmm... I did pull down and make the latest from 5349. When I run:
❯ goal --version
12886130966
3.16.180502.dev [HEAD] (commit #28487271+)
go-algorand is licensed with AGPLv3.0
source code available at https://github.com/algorand/go-algorand
and git log gives:
commit 284872714e46ae7504e02a7288c9837a000942a3 (HEAD, will/will/follower-catchup-pause)
Author: Will Winder <wwinder.unh@gmail.com>
Date: Wed May 3 07:19:57 2023 -0400
Remove old test.
So are the errors I'm seeing necessarily from your link?
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.
One possible issue is that I'm merging into another branch. I'll try a clean version of the commit.
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.
Ran again with a clean version of this PR. Taking some notes:
Command:
❯ conduit -d ./data2 -r 10009217
... after around 30 seconds ...
{"__type":"Conduit","_name":"main","level":"info","msg":"Pipeline round: 10009217","time":"2023-05-04T10:25:38-05:00"}
... another minute or so ...
{"__type":"processor","_name":"algod","level":"error","msg":"error getting block for round 10009217 (attempt 0)","time":"2023-05-04T10:26:38-05:00"}
{"__type":"processor","_name":"algod","level":"error","msg":"error getting block for round 10009217 (attempt 1)","time":"2023-05-04T10:27:38-05:00"}
at the same time getting algod's status (30s and around 3 minutes in)
❯ just status
Last committed block: 6483
Time since last block: 0.0s
Sync Time: 33.6s
Last consensus protocol: https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0
Next consensus protocol: https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0
Round for next consensus protocol: 6484
Next consensus protocol supported: true
Last Catchpoint:
Genesis ID: mainnet-v1.0
Genesis hash: wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=
RUNNING
❯ just status
Last committed block: 39148
Time since last block: 0.0s
Sync Time: 225.6s
Last consensus protocol: https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0
Next consensus protocol: https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0
Round for next consensus protocol: 39149
Next consensus protocol supported: true
Last Catchpoint:
Genesis ID: mainnet-v1.0
Genesis hash: wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=
RUNNING
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.
Ended up failing the same way as before.
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.
not finished reading, but want to address a question
# testnet: https://algorand-catchpoints.s3.us-east-2.amazonaws.com/consolidated/testnet_catchpoints.txt | ||
# Automatically download an appropriate catchpoint label. If false, you | ||
# must specify a catchpoint to use fast catchup. | ||
auto: false |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
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.
Convinced that the issues I'm encountering are un-related to this PR, and that this work solves the problems in question.
Summary
Adds a new option to automatically lookup an appropriate catchpoint label during startup.
Test Plan
New unit tests.
Manually run conduit with
-r 27000001
to see that the correct catchpoint label is automatically populated.