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

services/horizon: Avoid waiting for the first checkpoint in captive-core online mode #3201

Merged

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented Nov 9, 2020

What

As discussed with @rokopt and @graydon , there is no need to provide a ledger hash when streaming from ledger before the first checkpoint.

Why

It allows Horizon to start ingesting before the first checkpoint is reached (which incurs in a ~5min wait when ingesting from the beginning).

Known limitations

N/A

@cla-bot cla-bot bot added the cla: yes label Nov 9, 2020
@@ -284,28 +284,29 @@ func (c *CaptiveStellarCore) runFromParams(from uint32) (runFrom uint32, ledgerH
}

if from <= 63 {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we should provide the hash when from from == 63?

@2opremio 2opremio force-pushed the do-not-wait-until-first-checkpoint branch 2 times, most recently from aaaf23d to 5ef5c56 Compare November 9, 2020 23:56
@tamirms
Copy link
Contributor

tamirms commented Nov 10, 2020

@2opremio I thought this depends on rokopt/stellar-core@3cea6ee which, as far as I know, has not been released in stellar core?

@2opremio
Copy link
Contributor Author

@2opremio I thought this depends on rokopt/stellar-core@3cea6ee which, as far as I know, has not been released in stellar core?

AFAIU, that change is to allow providing --start-at-ledger 1 (which we still work around)

@2opremio 2opremio force-pushed the do-not-wait-until-first-checkpoint branch from 5ef5c56 to b1672af Compare November 11, 2020 13:47
@2opremio 2opremio merged commit a25756d into stellar:master Nov 11, 2020
@2opremio 2opremio deleted the do-not-wait-until-first-checkpoint branch November 11, 2020 14:14
tamirms added a commit to tamirms/go that referenced this pull request Dec 4, 2020
tamirms added a commit that referenced this pull request Dec 4, 2020
…meter is omitted (#3265)

In #3201 we assumed it was possible to omit the --start-at-hash parameter when starting from the genesis ledger. However, Stellar Core actually fails when attempting that command. The --start-at-hash parameter is always required when using --start-at-ledger.

This means that if we want to stream from the genesis ledger we need to determine the either the horizon db or the history archives.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants