@ocap/statedb-sqlite 1.31.2 → 1.31.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/db.d.mts CHANGED
@@ -81,7 +81,6 @@ declare class SqliteStateDB extends StateDB implements IStateDB {
81
81
  /**
82
82
  * Fail startup instead of failing every reserve-tracking rollup write later (#1548): a file whose migration
83
83
  * bookkeeping says 004 ran but whose `rollup` table lacks the columns (copied/hand-built DB) must not open.
84
- * Mirrors the Dolt backend's `rollup.reserves` startup guard.
85
84
  */
86
85
  private assertRollupReserveColumns;
87
86
  /**
package/esm/db.mjs CHANGED
@@ -230,7 +230,6 @@ var SqliteStateDB = class extends StateDB {
230
230
  /**
231
231
  * Fail startup instead of failing every reserve-tracking rollup write later (#1548): a file whose migration
232
232
  * bookkeeping says 004 ran but whose `rollup` table lacks the columns (copied/hand-built DB) must not open.
233
- * Mirrors the Dolt backend's `rollup.reserves` startup guard.
234
233
  */
235
234
  async assertRollupReserveColumns() {
236
235
  const { rows } = await sql`SELECT name FROM pragma_table_info('rollup')`.execute(this.db);
@@ -41,8 +41,8 @@ interface ReconcileOptions {
41
41
  dryRun?: boolean;
42
42
  /**
43
43
  * Required when `dryRun: false`. Reconcile `--apply` writes SQLite rows directly and bypasses all protocol
44
- * validation (no tx, no ledger entry), so it must be an explicit operator decision. Never use on a chain
45
- * whose authoritative statedb is Dolt (production main/beta): it cannot reach Dolt and would diverge it.
44
+ * validation (no tx, no ledger entry), so it must be an explicit operator decision. Never run it against a live
45
+ * node's files while the node is running.
46
46
  */
47
47
  allowProtocolBypass?: boolean;
48
48
  /** Reconcile token.totalSupply (and active tokenFactory.currentSupply) to match authoritative holder + revoked balances. */
@@ -65,7 +65,7 @@ interface ReconcileResult {
65
65
  }
66
66
  /**
67
67
  * Verification and reconcile are SQLite-only (they query SQLite tables through kysely). Fail loudly when given
68
- * any other backend (e.g. statedb-dolt, statedb-memory) instead of crashing midway or silently skipping.
68
+ * any other backend (e.g. statedb-memory) instead of crashing midway or silently skipping.
69
69
  */
70
70
  declare function assertSqliteStateDb(db: unknown): void;
71
71
  /**
package/esm/reconcile.mjs CHANGED
@@ -7,11 +7,11 @@ import { toStakeAddress, toTokenCharterAssetAddress } from "@arcblock/did-util";
7
7
  //#region src/reconcile.ts
8
8
  /**
9
9
  * Verification and reconcile are SQLite-only (they query SQLite tables through kysely). Fail loudly when given
10
- * any other backend (e.g. statedb-dolt, statedb-memory) instead of crashing midway or silently skipping.
10
+ * any other backend (e.g. statedb-memory) instead of crashing midway or silently skipping.
11
11
  */
12
12
  function assertSqliteStateDb(db) {
13
13
  const candidate = db;
14
- if (!candidate || typeof candidate.getKysely !== "function") throw new Error("Chain state verify/reconcile only supports @ocap/statedb-sqlite. Dolt and other backends are not supported (read-only verification for Dolt is not implemented).");
14
+ if (!candidate || typeof candidate.getKysely !== "function") throw new Error("Chain state verify/reconcile only supports @ocap/statedb-sqlite. Other backends are not supported.");
15
15
  }
16
16
  const CANONICAL_UINT_REGEX = /^\d+$/;
17
17
  function parseJsonColumn(raw, fallback) {
package/lib/db.cjs CHANGED
@@ -232,7 +232,6 @@ var SqliteStateDB = class extends _ocap_statedb.StateDB {
232
232
  /**
233
233
  * Fail startup instead of failing every reserve-tracking rollup write later (#1548): a file whose migration
234
234
  * bookkeeping says 004 ran but whose `rollup` table lacks the columns (copied/hand-built DB) must not open.
235
- * Mirrors the Dolt backend's `rollup.reserves` startup guard.
236
235
  */
237
236
  async assertRollupReserveColumns() {
238
237
  const { rows } = await kysely.sql`SELECT name FROM pragma_table_info('rollup')`.execute(this.db);
package/lib/db.d.cts CHANGED
@@ -81,7 +81,6 @@ declare class SqliteStateDB extends StateDB implements IStateDB {
81
81
  /**
82
82
  * Fail startup instead of failing every reserve-tracking rollup write later (#1548): a file whose migration
83
83
  * bookkeeping says 004 ran but whose `rollup` table lacks the columns (copied/hand-built DB) must not open.
84
- * Mirrors the Dolt backend's `rollup.reserves` startup guard.
85
84
  */
86
85
  private assertRollupReserveColumns;
87
86
  /**
package/lib/reconcile.cjs CHANGED
@@ -8,11 +8,11 @@ let _arcblock_did_util = require("@arcblock/did-util");
8
8
  //#region src/reconcile.ts
9
9
  /**
10
10
  * Verification and reconcile are SQLite-only (they query SQLite tables through kysely). Fail loudly when given
11
- * any other backend (e.g. statedb-dolt, statedb-memory) instead of crashing midway or silently skipping.
11
+ * any other backend (e.g. statedb-memory) instead of crashing midway or silently skipping.
12
12
  */
13
13
  function assertSqliteStateDb(db) {
14
14
  const candidate = db;
15
- if (!candidate || typeof candidate.getKysely !== "function") throw new Error("Chain state verify/reconcile only supports @ocap/statedb-sqlite. Dolt and other backends are not supported (read-only verification for Dolt is not implemented).");
15
+ if (!candidate || typeof candidate.getKysely !== "function") throw new Error("Chain state verify/reconcile only supports @ocap/statedb-sqlite. Other backends are not supported.");
16
16
  }
17
17
  const CANONICAL_UINT_REGEX = /^\d+$/;
18
18
  function parseJsonColumn(raw, fallback) {
@@ -41,8 +41,8 @@ interface ReconcileOptions {
41
41
  dryRun?: boolean;
42
42
  /**
43
43
  * Required when `dryRun: false`. Reconcile `--apply` writes SQLite rows directly and bypasses all protocol
44
- * validation (no tx, no ledger entry), so it must be an explicit operator decision. Never use on a chain
45
- * whose authoritative statedb is Dolt (production main/beta): it cannot reach Dolt and would diverge it.
44
+ * validation (no tx, no ledger entry), so it must be an explicit operator decision. Never run it against a live
45
+ * node's files while the node is running.
46
46
  */
47
47
  allowProtocolBypass?: boolean;
48
48
  /** Reconcile token.totalSupply (and active tokenFactory.currentSupply) to match authoritative holder + revoked balances. */
@@ -65,7 +65,7 @@ interface ReconcileResult {
65
65
  }
66
66
  /**
67
67
  * Verification and reconcile are SQLite-only (they query SQLite tables through kysely). Fail loudly when given
68
- * any other backend (e.g. statedb-dolt, statedb-memory) instead of crashing midway or silently skipping.
68
+ * any other backend (e.g. statedb-memory) instead of crashing midway or silently skipping.
69
69
  */
70
70
  declare function assertSqliteStateDb(db: unknown): void;
71
71
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocap/statedb-sqlite",
3
3
  "description": "OCAP statedb adapter that uses SQLite as backend",
4
- "version": "1.31.2",
4
+ "version": "1.31.4",
5
5
  "author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)",
6
6
  "bugs": {
7
7
  "url": "https://github.com/ArcBlock/blockchain/issues",
@@ -14,7 +14,7 @@
14
14
  "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)"
15
15
  ],
16
16
  "devDependencies": {
17
- "@ocap/statedb-test": "1.31.2"
17
+ "@ocap/statedb-test": "1.31.4"
18
18
  },
19
19
  "homepage": "https://github.com/ArcBlock/blockchain/tree/master/statedb/sqlite",
20
20
  "keywords": [
@@ -63,12 +63,12 @@
63
63
  "clean": "rm -rf lib esm"
64
64
  },
65
65
  "dependencies": {
66
- "@arcblock/did": "1.31.2",
67
- "@arcblock/did-util": "1.31.2",
68
- "@ocap/state": "1.31.2",
69
- "@ocap/statedb": "1.31.2",
70
- "@ocap/types": "1.31.2",
71
- "@ocap/util": "1.31.2",
66
+ "@arcblock/did": "1.31.4",
67
+ "@arcblock/did-util": "1.31.4",
68
+ "@ocap/state": "1.31.4",
69
+ "@ocap/statedb": "1.31.4",
70
+ "@ocap/types": "1.31.4",
71
+ "@ocap/util": "1.31.4",
72
72
  "better-sqlite3": "^11.8.1",
73
73
  "kysely": "^0.28.14",
74
74
  "kysely-bun-sqlite": "^0.4.0",