Skip to content
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: fast catchup #48

Merged
merged 11 commits into from
Dec 24, 2024
Merged

feat: fast catchup #48

merged 11 commits into from
Dec 24, 2024

Conversation

PhearZero
Copy link
Member

@PhearZero PhearZero commented Dec 17, 2024

ℹ Overview

  • adds fast catchup
  • refactors internal library

Blocked by

📝 Related Issues

✅ Acceptance:

  • Pre-commit checks pass

@PhearZero PhearZero added this to the Milestone 2 milestone Dec 17, 2024
@PhearZero PhearZero self-assigned this Dec 17, 2024
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 34.01970% with 737 lines in your changes missing coverage. Please review.

Project coverage is 38.05%. Comparing base (b38db59) to head (9d2f9b3).
Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
api/lf.go 0.00% 214 Missing ⚠️
cmd/utils/config.go 31.81% 70 Missing and 5 partials ⚠️
internal/algod/state.go 40.44% 45 Missing and 8 partials ⚠️
cmd/node/catchup/debug.go 0.00% 44 Missing ⚠️
internal/algod/status.go 46.75% 34 Missing and 7 partials ⚠️
cmd/node/catchup/start.go 5.40% 35 Missing ⚠️
cmd/node/sync.go 0.00% 33 Missing ⚠️
cmd/node/catchup/stop.go 6.45% 29 Missing ⚠️
cmd/utils/flags.go 30.95% 25 Missing and 4 partials ⚠️
cmd/root.go 0.00% 27 Missing ⚠️
... and 25 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
- Coverage   38.55%   38.05%   -0.50%     
==========================================
  Files          72       73       +1     
  Lines        5514     5568      +54     
==========================================
- Hits         2126     2119       -7     
- Misses       3288     3345      +57     
- Partials      100      104       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PhearZero PhearZero marked this pull request as ready for review December 17, 2024 21:35
@PhearZero PhearZero force-pushed the feat/fast-catchup branch 2 times, most recently from b081bff to da3e55e Compare December 19, 2024 19:53
Base automatically changed from feat/algod-node-install to main December 23, 2024 21:30
PhearZero pushed a commit that referenced this pull request Dec 23, 2024
# This is the 1st commit message:

feat: add prompt-ui

# This is the commit message #2:

feat: configure and set algod data directory

# This is the commit message #3:

fix: RX/TX display

# This is the commit message #4:

fix: bit rate display for GB

# This is the commit message #5:

fix: configuration override order

# This is the commit message #6:

feat: handle invalid configuration and token gracefully

# This is the commit message #7:

test: fix test state

# This is the commit message #8:

fix: loading of custom endpoint address

# This is the commit message #9:

fix: loading default port

# This is the commit message #10:

test: clear viper settings

# This is the commit message #11:

fix: finds path to directory and gives cmd instruction

# This is the commit message #12:

feat: adds node start and node stop commands

# This is the commit message #13:

fix: add -y

# This is the commit message #14:

fix: turn script into indivudal commands

# This is the commit message #15:

feat: check if sudo, clarify shell

# This is the commit message #16:

chore: make more go idiomatic

# This is the commit message #17:

fix: fix proper path check

# This is the commit message #18:

fix: interact with systemctl, cleanup prompts

# This is the commit message #19:

fix: remove sudo

# This is the commit message #20:

fix: separate commands

# This is the commit message #21:

fix: proper algorand service name

# This is the commit message #22:

fix: calling with sudo

# This is the commit message #23:

chore: testing systemctl

# This is the commit message #24:

fix: checks algorand system service has been enabled directly

# This is the commit message #25:

feat: implements editAlgorandServiceFile

# This is the commit message #26:

fix: else statement

# This is the commit message #27:

fix: quick check branch

# This is the commit message #28:

fix: string template

# This is the commit message #29:

feat: adds upgrade

# This is the commit message #30:

chore: removeu nnecessary code

# This is the commit message #31:

fix: check that installed and candidate are the same

# This is the commit message #32:

chore: improve print

# This is the commit message #33:

chore: add more output

# This is the commit message #34:

fix: single quote

# This is the commit message #35:

fix: -y

# This is the commit message #36:

fix: systemctl

# This is the commit message #37:

fix: upgrade and sudo text

# This is the commit message #38:

chore: go mod tidy

# This is the commit message #39:

fix: upgrade

# This is the commit message #40:

feat: disable ui elements while syncing

# This is the commit message #41:

feat: skip account loading on syncing
feat: remove offline account expires date

# This is the commit message #42:

feat: installs algod and sets up service on mac

# This is the commit message #43:

feat: refactor, + mac

# This is the commit message #44:

feat: adds uninstall, mac only

# This is the commit message #45:

fix: remove plist file

# This is the commit message #46:

chore: rename

# This is the commit message #47:

test: protocol snapshots and 100%

# This is the commit message #48:

test: status snapshots and 100%

# This is the commit message #49:

test: error page snapshots and 100%

# This is the commit message #50:

test: controls snapshots

# This is the commit message #51:

test: accounts snapshots
# Conflicts:
#	cmd/root.go
#	internal/participation.go
#	internal/state.go
#	internal/status.go
#	ui/modal/controller.go
#	ui/modal/model.go
#	ui/modals/transaction/view.go
if err != nil {
return response, err
}
defer res.Body.Close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be on line 64 instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request body should be present on all non-nil errors.

Comment on lines 17 to 18
Short: "Start a fast catchup",
Long: "Checks if the node is caught up and if not, starts catching up.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix descriptions

if err != nil {
log.Fatal(err)
}
log.Info(style.Green.Render("Latest Catchpoint: " + msg))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this make sense to print when we are stopping a catchpoint?

style.Bold(syncCmdShortTxt),
"",
style.BoldUnderline("Overview:"),
"Fetch the latest catchpoint and use Fast-Catchup to check if the node is caught up to the latest block.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description indicates it is a status check (and not an action)

Copy link
Member Author

@PhearZero PhearZero Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is technically both, since it is using the min parameter it should exit early if it is within the round window. It could have better verbiage to explain the early exit

if string(item.Key.VoteParticipationKey) == string(votekey) {
return &item.Id
}
}
return nil
}

// ToLoraDeepLink generates a Lora deep link URL for a transaction wizard based on network, offline state, and participation key.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we using the toLoraDeepLink function anywhere now that we do the redirects?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No usages anymore, we can clean it up.

if err != nil {
log.Fatal(err)
}
log.Info(style.Green.Render("Catchpoint Message: " + msg))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "Node response" or something similar works better. This usually returns "ok", right?

Copy link
Contributor

@tasosbit tasosbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGreatTM

@PhearZero PhearZero merged commit 1ea642e into main Dec 24, 2024
4 of 5 checks passed
@PhearZero PhearZero deleted the feat/fast-catchup branch December 24, 2024 12:46
tasosbit pushed a commit that referenced this pull request Jan 22, 2025
# This is the 1st commit message:

feat: add prompt-ui

# This is the commit message #2:

feat: configure and set algod data directory

# This is the commit message #3:

fix: RX/TX display

# This is the commit message #4:

fix: bit rate display for GB

# This is the commit message #5:

fix: configuration override order

# This is the commit message #6:

feat: handle invalid configuration and token gracefully

# This is the commit message #7:

test: fix test state

# This is the commit message #8:

fix: loading of custom endpoint address

# This is the commit message #9:

fix: loading default port

# This is the commit message #10:

test: clear viper settings

# This is the commit message #11:

fix: finds path to directory and gives cmd instruction

# This is the commit message #12:

feat: adds node start and node stop commands

# This is the commit message #13:

fix: add -y

# This is the commit message #14:

fix: turn script into indivudal commands

# This is the commit message #15:

feat: check if sudo, clarify shell

# This is the commit message #16:

chore: make more go idiomatic

# This is the commit message #17:

fix: fix proper path check

# This is the commit message #18:

fix: interact with systemctl, cleanup prompts

# This is the commit message #19:

fix: remove sudo

# This is the commit message #20:

fix: separate commands

# This is the commit message #21:

fix: proper algorand service name

# This is the commit message #22:

fix: calling with sudo

# This is the commit message #23:

chore: testing systemctl

# This is the commit message #24:

fix: checks algorand system service has been enabled directly

# This is the commit message #25:

feat: implements editAlgorandServiceFile

# This is the commit message #26:

fix: else statement

# This is the commit message #27:

fix: quick check branch

# This is the commit message #28:

fix: string template

# This is the commit message #29:

feat: adds upgrade

# This is the commit message #30:

chore: removeu nnecessary code

# This is the commit message #31:

fix: check that installed and candidate are the same

# This is the commit message #32:

chore: improve print

# This is the commit message #33:

chore: add more output

# This is the commit message #34:

fix: single quote

# This is the commit message #35:

fix: -y

# This is the commit message #36:

fix: systemctl

# This is the commit message #37:

fix: upgrade and sudo text

# This is the commit message #38:

chore: go mod tidy

# This is the commit message #39:

fix: upgrade

# This is the commit message #40:

feat: disable ui elements while syncing

# This is the commit message #41:

feat: skip account loading on syncing
feat: remove offline account expires date

# This is the commit message #42:

feat: installs algod and sets up service on mac

# This is the commit message #43:

feat: refactor, + mac

# This is the commit message #44:

feat: adds uninstall, mac only

# This is the commit message #45:

fix: remove plist file

# This is the commit message #46:

chore: rename

# This is the commit message #47:

test: protocol snapshots and 100%

# This is the commit message #48:

test: status snapshots and 100%

# This is the commit message #49:

test: error page snapshots and 100%

# This is the commit message #50:

test: controls snapshots

# This is the commit message #51:

test: accounts snapshots
tasosbit pushed a commit that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants