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

Besu accepts and trashes old database without warning #862

Closed
hmijail opened this issue May 7, 2020 · 0 comments
Closed

Besu accepts and trashes old database without warning #862

hmijail opened this issue May 7, 2020 · 0 comments
Assignees
Labels
bug Something isn't working P3 Medium (ex: JSON-RPC request not working with a specific client library due to loose spec assumtion)

Comments

@hmijail
Copy link
Contributor

hmijail commented May 7, 2020

Description

As a mainnet node user, I want to restore an old backup of the database so that I can save weeks off the sync process.

Acceptance Criteria

  • The restored database is accepted and the sync resumes, or it is clearly rejected.

Steps to Reproduce (Bug)

  1. Get an old (v0) database subdirectory (/data/database)
  2. Put it inside a current /data directory
  3. Run Besu in full sync mode

Expected behavior: The sync resumes from the point at which the database was stored, or Besu stops if something is wrong with the database. It doesn't damage an existing database.

Actual behavior: Besu says it found an existing database,but it starts the sync from block 0, and starts modifying the existing files.

Frequency: always

Versions (Add all that apply)

  • Software version:
    1.4.4
  • Java version:
    openjdk 11.0.2 2019-01-15
    OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
  • OS Name & Version:
    NAME="Amazon Linux"
    VERSION="2"
    ID="amzn"
    ID_LIKE="centos rhel fedora"
    VERSION_ID="2"
    PRETTY_NAME="Amazon Linux 2"
    ANSI_COLOR="0;33"
    CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
    HOME_URL="https://amazonlinux.com/"
    Amazon Linux release 2 (Karoo)
  • Kernel Version:
    Linux ip-10-2-1-187.ap-southeast-2.compute.internal 4.14.173-137.229.amzn2.x86_64 Update Jenkins Build for Pantheon → Besu considerations #1 SMP Wed Apr 1 18:06:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Cloud VM, type, size: Amazon Web Services t3-large

Additional Information

The database seemed to be old enough to be v0 but the DATABASE_METADATA.json (which had not been saved with the database directory but had been created by current besu) said v1.

This could be a documentation / user behavior issue: the database subdirectory should be saved together with the DATABASE_METADATA.json file. But note that even PegaSys proddev have the database subdirectories, or even its naked contents, without the json files in PegaSys' S3 directories, so it does look like it needs clarification/safeguards.

@timbeiko timbeiko self-assigned this May 7, 2020
@timbeiko timbeiko added bug Something isn't working P3 Medium (ex: JSON-RPC request not working with a specific client library due to loose spec assumtion) labels May 7, 2020
@matkt matkt assigned matkt and unassigned matkt Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3 Medium (ex: JSON-RPC request not working with a specific client library due to loose spec assumtion)
Projects
None yet
Development

No branches or pull requests

3 participants