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

Feature: CLI command to repair local storage #333

Draft
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

odesenfans
Copy link
Contributor

Problem: the local storage of a CCN may get incoherent or corrupted
because of issues like downtime or maintenance gone wrong.

Solution: a new CLI command, 'repair'. This command checks the DB
to determine the files that should be stored on the node and
fetches them from the network.

odesenfans and others added 6 commits September 26, 2022 14:20
Problem: web wallets do not allow signing raw messages. Instead,
they require binary payloads in a specific format.

Solution: support Micheline-style signatures, i.e. signatures
supported by wallets like Beacon.

Users can now use Micheline or raw signatures by specifying
the `signature.signingType` field to "micheline" or "raw".
By default, "raw" is assumed.

Co-authored-by: Mike Hukiewitz <70762838+MHHukiewitz@users.noreply.github.com>
Problem: if an invalid message somehow managed to reach
the pending message collection, the message would be retried
indefinitely logging exceptions on each run.

Solution: drop invalid messages.
Problem: some dependencies were missing from the requirements, and
letting pip sort it out led to dependency conflicts.

Solution: add the dependencies to setup.cfg.
We now provide a CLI tool that integrates all the operations
commonly performed by node operators. Currently, this CLI
allows to:

* generate private keys for the node, replacing a functionality
  that was implemented in the CCN main app directly.
* run migrations, replacing the config updater script.
Added a new command to the CCN operator CLI to run a garbage
collector on local storage. The new `gc run` command lists
all the files that are not linked to any message or permanent
pin and deletes them.

Using the --verbose option, the command will print more details
on the files it will preserve and delete. The --dry-run option
allows to run the GC without actually deleting any file.
@odesenfans odesenfans requested a review from hoh October 4, 2022 17:07
@odesenfans odesenfans marked this pull request as draft October 4, 2022 17:07
@odesenfans
Copy link
Contributor Author

Depends on #269.

@odesenfans odesenfans assigned odesenfans and unassigned hoh Oct 4, 2022
Problem: the local storage of a CCN may get incoherent or corrupted
because of issues like downtime or maintenance gone wrong.

Solution: a new CLI command, 'repair'. This command checks the DB
to determine the files that should be stored on the node and
fetches them from the network.
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.

2 participants