FATAL Unrecoverable error {"error": "Error during preflight check for storagenode databases "bandwidth"

I really wish these errors would just point out the exact mismatch rather than dumping a fairly hard to read schema.

Alright, lets start over with a clean one. This will remove bandwidth stats, but shouldn’t impact payout. (bandwidth orders for payout are stored and sent from elsewhere)

  1. Stop the node

  2. Rename the bandwidth.db file to something like bandwidth.db-bak

  3. Run with your path

sqlite3 /your/path/to/bandwidth.db

Create new empty tables.

CREATE TABLE bandwidth_usage (
                                                satellite_id  BLOB    NOT NULL,
                                                action        INTEGER NOT NULL,
                                                amount        BIGINT  NOT NULL,
                                                created_at    TIMESTAMP NOT NULL
                                        );
CREATE TABLE bandwidth_usage_rollups (
                                                                                interval_start  TIMESTAMP NOT NULL,
                                                                                satellite_id    BLOB    NOT NULL,
                                                                                action          INTEGER NOT NULL,
                                                                                amount          BIGINT  NOT NULL,
                                                                                PRIMARY KEY ( interval_start, satellite_id, action )
                                                                        );
CREATE INDEX idx_bandwidth_usage_satellite ON bandwidth_usage(satellite_id);
CREATE INDEX idx_bandwidth_usage_created   ON bandwidth_usage(created_at);
  1. Exit sqlite
.quit
  1. Start node
3 Likes