Skip to content

Conversation

@vogel
Copy link
Contributor

@vogel vogel commented Nov 8, 2018

Description

Resolves #1814

Add new command publish which publishes all (or almost all) remaining checkpoints to history archives. I may leave one unpublished in case LCL is equal to last ledger in last checkpoint, in which case we must wait for next ledger from network before progressing. Publishing of that last checkpoint is postponed to normal stellar-core run.

This PR requires #1732 to be merged first

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v5.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

@MonsieurNicolas
Copy link
Contributor

This needs to be rebased @vogel

Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
@vogel
Copy link
Contributor Author

vogel commented Nov 30, 2018

Rebased


// set known cursors before starting maintenance job
ExternalQueue ps(*app);
ps.setInitialCursors(app->getConfig().KNOWN_CURSORS);
Copy link
Contributor

Choose a reason for hiding this comment

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

it would be cleaner to just set the right config elements so that app->start() does what you want (in this case, I think you just need to set STANDALONE to true)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

STANDALONE is set before - in CommandLine.cpp:runPublish function, by calling to Config::setNoListen.

Maintenance job is normally started in ApplicationImpl::start, which we don't use in command-line catchup and publish. I think we could move calling maintenance to the end of catchup/publish process, or just ignore that and postpone the maintenance itself to normal stellar-core runs (but we can't be sure there will be no instances of stellar-core used only for command-line catchup and publish).

Copy link
Contributor

Choose a reason for hiding this comment

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

You didn't understand my question: why not calling start if standalone is already set?

Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
@vogel
Copy link
Contributor Author

vogel commented Dec 4, 2018

Updated

@MonsieurNicolas
Copy link
Contributor

r+ ce473a1

latobarita added a commit that referenced this pull request Dec 4, 2018
Publish command

Reviewed-by: MonsieurNicolas
@latobarita latobarita merged commit ce473a1 into stellar:master Dec 4, 2018
@vogel vogel deleted the publish-command branch December 6, 2018 15:47
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