bulletin-deploy 0.7.28-rc.2 → 0.7.28

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.
@@ -8,7 +8,6 @@
8
8
  "backend": "https://polkadot-app-stg.parity.io/",
9
9
  "ipfs": "https://previewnet.substrate.dev",
10
10
  "autoAccountMapping": true,
11
- "bulletinAuthorizeV2": true,
12
11
  "registerStorageDeposit": 2000000000000,
13
12
  "contracts": {
14
13
  "DOTNS_PROTOCOL_REGISTRY": "0xc07A2F24387DA27283CD87b9F24573b74C9e0c9b",
@@ -55,7 +54,6 @@
55
54
  "ipfs": "https://paseo-bulletin-next-ipfs.polkadot.io",
56
55
  "docsUrl": "https://sre.teleport.parity.io/environments/paseo-next/",
57
56
  "autoAccountMapping": true,
58
- "bulletinAuthorizeV2": true,
59
57
  "nativeToEthRatio": 100000000,
60
58
  "registerStorageDeposit": 2000000000000,
61
59
  "popSelfServe": {
@@ -9,10 +9,10 @@ import {
9
9
  offerBugReport,
10
10
  scrubSecrets,
11
11
  setDeployContext
12
- } from "./chunk-QMD4BWPM.js";
13
- import "./chunk-C5ICDZ65.js";
14
- import "./chunk-QNRCWCBP.js";
15
- import "./chunk-O6GP6JOD.js";
12
+ } from "./chunk-B6MBXUCT.js";
13
+ import "./chunk-23U57PZI.js";
14
+ import "./chunk-VS36INHV.js";
15
+ import "./chunk-RDTUUXZM.js";
16
16
  export {
17
17
  buildCliFlagsSummary,
18
18
  buildLabels,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-QNRCWCBP.js";
3
+ } from "./chunk-VS36INHV.js";
4
4
 
5
5
  // src/version-check.ts
6
6
  import { execSync, execFileSync } from "child_process";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  isTestnetSpecName
3
- } from "./chunk-QMYW3D6E.js";
3
+ } from "./chunk-GSATPVTP.js";
4
4
  import {
5
5
  captureWarning,
6
6
  setDeployAttribute,
7
7
  setDeploySentryTag,
8
8
  truncateAddress,
9
9
  withSpan
10
- } from "./chunk-QNRCWCBP.js";
10
+ } from "./chunk-VS36INHV.js";
11
11
  import {
12
12
  validateContractAddresses
13
- } from "./chunk-OITUIM2E.js";
13
+ } from "./chunk-HZKRLQLG.js";
14
14
  import {
15
15
  NonRetryableError
16
16
  } from "./chunk-ZOC4GITL.js";
@@ -93,7 +93,8 @@ var CONNECTION_TIMEOUT_MS = 3e4;
93
93
  var OPERATION_TIMEOUT_MS = 3e5;
94
94
  var TX_TIMEOUT_MS = 9e4;
95
95
  var TX_CHAIN_TIME_BUDGET_MS = 18e4;
96
- var TX_WALL_CLOCK_CEILING_MS = 10 * 60 * 1e3;
96
+ var TX_WALL_CLOCK_CEILING_MS = 24e4;
97
+ var TX_NO_PROGRESS_MS = 9e4;
97
98
  var WS_HEARTBEAT_TIMEOUT_MS = 3e5;
98
99
  var DOTNS_TX_MAX_ATTEMPTS = 3;
99
100
  function classifyTxRetryDecision(err) {
@@ -104,6 +105,7 @@ function classifyTxRetryDecision(err) {
104
105
  if (/"type"\s*:\s*"future"|\binvalid::future\b/.test(lower)) return "retry";
105
106
  if (lower.includes("websocket") || lower.includes("connection") || lower.includes("socket closed") || lower.includes("disconnect")) return "retry";
106
107
  if (lower.includes("timed out") || lower.includes("timeout")) return "retry";
108
+ if (lower.includes("transaction watcher silent")) return "retry";
107
109
  return "abort";
108
110
  }
109
111
  var DEFAULT_MNEMONIC = "bottom drive obey lake curtain smoke basket hold race lonely fit walk";
@@ -400,8 +402,8 @@ function sanitizeDomainLabel(label) {
400
402
  function validateDomainLabel(label, opts = {}) {
401
403
  if (!/^[a-z0-9-]{3,}$/.test(label)) throw new Error("Invalid domain label: must contain only lowercase letters, digits, and hyphens, min 3 chars");
402
404
  if (label.startsWith("-") || label.endsWith("-")) throw new Error("Invalid domain label: cannot start or end with hyphen");
403
- const sanitized = sanitizeDomainLabel(label);
404
- if (/-\d+$/.test(sanitized)) {
405
+ const sanitized = opts.skipSanitize ? label : sanitizeDomainLabel(label);
406
+ if (!opts.skipSanitize && /-\d+$/.test(sanitized)) {
405
407
  const baseWithHyphen = sanitized.replace(/\d+$/, "");
406
408
  const dropHyphen = sanitized.replace(/-(\d+)$/, "$1");
407
409
  const insertSegment = sanitized.replace(/-(\d+)$/, "-pr$1");
@@ -471,7 +473,7 @@ function parseDomainName(input) {
471
473
  return { isSubdomain: false, label: sanitized, sublabel: null, parentLabel: null, fullName: `${sanitized}.dot` };
472
474
  }
473
475
  if (parts.length === 2) {
474
- const sanitizedSub = validateDomainLabel(parts[0], { checkReserved: false });
476
+ const sanitizedSub = validateDomainLabel(parts[0], { checkReserved: false, skipSanitize: true });
475
477
  const sanitizedParent = validateDomainLabel(parts[1]);
476
478
  const fullLabel = `${sanitizedSub}.${sanitizedParent}`;
477
479
  return { isSubdomain: true, label: fullLabel, sublabel: sanitizedSub, parentLabel: sanitizedParent, fullName: `${fullLabel}.dot` };
@@ -578,6 +580,8 @@ var ReviveClientWrapper = class _ReviveClientWrapper {
578
580
  }
579
581
  };
580
582
  const startWallClockMs = Date.now();
583
+ let lastEventAt = Date.now();
584
+ let lastEventType = "(none)";
581
585
  let startChainTimeMs = null;
582
586
  const poll = async () => {
583
587
  if (settled) return;
@@ -612,6 +616,12 @@ var ReviveClientWrapper = class _ReviveClientWrapper {
612
616
  finish(reject)(new Error(`Transaction not included after ${Math.floor(chainElapsedMs / 1e3)}s of chain progress (budget=${TX_CHAIN_TIME_BUDGET_MS / 1e3}s)`));
613
617
  return;
614
618
  }
619
+ const silentMs = Date.now() - lastEventAt;
620
+ if (silentMs > TX_NO_PROGRESS_MS) {
621
+ statusCallback("failed");
622
+ finish(reject)(new Error(`transaction watcher silent for ${Math.floor(silentMs / 1e3)}s after ${lastEventType}`));
623
+ return;
624
+ }
615
625
  } catch {
616
626
  }
617
627
  if (!settled) deadlinePoller = setTimeout(poll, 6e3);
@@ -620,6 +630,8 @@ var ReviveClientWrapper = class _ReviveClientWrapper {
620
630
  try {
621
631
  sub = extrinsic.signSubmitAndWatch(signer, { mortality: { mortal: true, period: 256 } }).subscribe({
622
632
  next: (event) => {
633
+ lastEventAt = Date.now();
634
+ lastEventType = event.type;
623
635
  const transactionHash = event.txHash?.toString();
624
636
  switch (event.type) {
625
637
  case "signed":
@@ -721,7 +733,12 @@ var ReviveClientWrapper = class _ReviveClientWrapper {
721
733
  } catch {
722
734
  }
723
735
  }
724
- const prep = await this.dryRunReviveCall(contractAddress, value, encodedData, signerSubstrateAddress, { functionName, args, contracts });
736
+ const prep = await withSpan(
737
+ "chain.dry_run",
738
+ `dry-run ${functionName ?? "Revive.call"}`,
739
+ { "chain.function_name": functionName ?? "Revive.call" },
740
+ () => this.dryRunReviveCall(contractAddress, value, encodedData, signerSubstrateAddress, { functionName, args, contracts })
741
+ );
725
742
  const buildExtrinsic = () => this.client.tx.Revive.call({ dest: contractAddress, value, weight_limit: prep.weight_limit, storage_deposit_limit: prep.storage_deposit_limit, data: Binary.fromHex(encodedData) });
726
743
  let nonceFallback;
727
744
  if (useNoncePolling) {
@@ -731,7 +748,12 @@ var ReviveClientWrapper = class _ReviveClientWrapper {
731
748
  } catch {
732
749
  }
733
750
  }
734
- return await this.signAndSubmitWithRetry(buildExtrinsic, signer, statusCallback, "Revive.call", { nonceFallback, verifyEffect });
751
+ return await withSpan(
752
+ "chain.tx.submit",
753
+ `sign+submit ${functionName ?? "Revive.call"}`,
754
+ { "chain.function_name": functionName ?? "Revive.call", "chain.use_nonce_polling": Boolean(useNoncePolling) },
755
+ () => this.signAndSubmitWithRetry(buildExtrinsic, signer, statusCallback, "Revive.call", { nonceFallback, verifyEffect })
756
+ );
735
757
  }
736
758
  // Dry-runs each call individually, then wraps them in a single
737
759
  // Utility.batch_all extrinsic. batch_all is atomic over inner calls — only
@@ -740,7 +762,12 @@ var ReviveClientWrapper = class _ReviveClientWrapper {
740
762
  async submitBatchedTransactions(calls, signerSubstrateAddress, signer, statusCallback) {
741
763
  if (calls.length === 0) throw new Error("submitBatchedTransactions: at least one call required");
742
764
  await this.ensureAccountMapped(signerSubstrateAddress, signer);
743
- const preps = await Promise.all(calls.map((c) => this.dryRunReviveCall(c.contractAddress, c.value, c.encodedData, signerSubstrateAddress, { functionName: c.functionName, args: c.args })));
765
+ const preps = await withSpan(
766
+ "chain.dry_run",
767
+ "dry-run Utility.batch_all",
768
+ { "chain.function_name": "Utility.batch_all" },
769
+ () => Promise.all(calls.map((c) => this.dryRunReviveCall(c.contractAddress, c.value, c.encodedData, signerSubstrateAddress, { functionName: c.functionName, args: c.args })))
770
+ );
744
771
  const buildExtrinsic = () => {
745
772
  const inners = calls.map((c, i) => this.client.tx.Revive.call({
746
773
  dest: c.contractAddress,
@@ -751,7 +778,12 @@ var ReviveClientWrapper = class _ReviveClientWrapper {
751
778
  }).decodedCall);
752
779
  return this.client.tx.Utility.batch_all({ calls: inners });
753
780
  };
754
- return await this.signAndSubmitWithRetry(buildExtrinsic, signer, statusCallback, "Utility.batch_all");
781
+ return await withSpan(
782
+ "chain.tx.submit",
783
+ "sign+submit Utility.batch_all",
784
+ { "chain.function_name": "Utility.batch_all" },
785
+ () => this.signAndSubmitWithRetry(buildExtrinsic, signer, statusCallback, "Utility.batch_all")
786
+ );
755
787
  }
756
788
  };
757
789
  function formatDispatchError(err) {
@@ -1329,13 +1361,39 @@ var DotNS = class {
1329
1361
  const parentNode = namehash(`${parentLabel}.dot`);
1330
1362
  const subnodeNode = namehash(`${sublabel}.${parentLabel}.dot`);
1331
1363
  const subnodeRecord = { parentNode, subLabel: sublabel, parentLabel, owner: this.evmAddress };
1364
+ const MAX_VERIFY_CHAIN_SECONDS = 30;
1365
+ const POLL_INTERVAL_MS = 2e3;
1366
+ const verifyEffect = async () => {
1367
+ const wrapper = this.clientWrapper;
1368
+ if (!this.connected || !wrapper) return false;
1369
+ const startChainMs = Number(await wrapper.client.query.Timestamp.Now.getValue());
1370
+ let lastPrintedElapsed = -1;
1371
+ while (true) {
1372
+ const liveWrapper = this.clientWrapper;
1373
+ if (!this.connected || !liveWrapper) return false;
1374
+ const [ownership, nowChainMs] = await Promise.all([
1375
+ this.checkSubdomainOwnership(sublabel, parentLabel),
1376
+ liveWrapper.client.query.Timestamp.Now.getValue().then(Number)
1377
+ ]);
1378
+ if (ownership.owned) return true;
1379
+ const chainElapsed = (nowChainMs - startChainMs) / 1e3;
1380
+ if (chainElapsed >= MAX_VERIFY_CHAIN_SECONDS) return false;
1381
+ const floored = Math.floor(chainElapsed);
1382
+ if (floored > lastPrintedElapsed) {
1383
+ console.log(` Awaiting subnode finalization [verifyEffect] (chain time +${floored}s / ${MAX_VERIFY_CHAIN_SECONDS}s)...`);
1384
+ lastPrintedElapsed = floored;
1385
+ }
1386
+ await new Promise((r) => setTimeout(r, POLL_INTERVAL_MS));
1387
+ }
1388
+ };
1332
1389
  const txResolution = await this.submitBatchedContractCalls(
1333
1390
  [
1334
1391
  { contractAddress: this._contracts.DOTNS_REGISTRY, abi: DOTNS_REGISTRY_ABI, functionName: "setSubnodeOwner", args: [subnodeRecord] },
1335
1392
  { contractAddress: this._contracts.DOTNS_REGISTRY, abi: DOTNS_REGISTRY_ABI, functionName: "setResolver", args: [subnodeNode, this._contracts.DOTNS_CONTENT_RESOLVER] }
1336
1393
  ],
1337
1394
  (s) => console.log(` ${s}`),
1338
- `Utility.batch_all (register ${sublabel}.${parentLabel}.dot)`
1395
+ `Utility.batch_all (register ${sublabel}.${parentLabel}.dot)`,
1396
+ { verifyEffect }
1339
1397
  );
1340
1398
  logTxResolution(txResolution);
1341
1399
  if (txResolution.kind === TX_KIND_HASH) {
@@ -1363,7 +1421,7 @@ var DotNS = class {
1363
1421
  * budget for every subsequent call, on the assumption sibling
1364
1422
  * registry/resolver writes are similarly sized.
1365
1423
  */
1366
- async submitBatchedContractCalls(calls, statusCallback, label) {
1424
+ async submitBatchedContractCalls(calls, statusCallback, label, { verifyEffect } = {}) {
1367
1425
  this.ensureConnected();
1368
1426
  if (!this.clientWrapper) throw new Error(`${label}: polkadot-api client not available`);
1369
1427
  if (calls.length === 0) throw new Error(`${label}: at least one inner call required`);
@@ -1412,7 +1470,7 @@ var DotNS = class {
1412
1470
  return client.tx.Utility.batch_all({ calls: inner.map((c) => c.decodedCall) });
1413
1471
  };
1414
1472
  return await withTimeout(
1415
- this.clientWrapper.signAndSubmitWithRetry(buildBatch, this.signer, statusCallback, label),
1473
+ this.clientWrapper.signAndSubmitWithRetry(buildBatch, this.signer, statusCallback, label, { verifyEffect }),
1416
1474
  OPERATION_TIMEOUT_MS,
1417
1475
  label
1418
1476
  );
@@ -2338,6 +2396,7 @@ export {
2338
2396
  TX_TIMEOUT_MS,
2339
2397
  TX_CHAIN_TIME_BUDGET_MS,
2340
2398
  TX_WALL_CLOCK_CEILING_MS,
2399
+ TX_NO_PROGRESS_MS,
2341
2400
  WS_HEARTBEAT_TIMEOUT_MS,
2342
2401
  DOTNS_TX_MAX_ATTEMPTS,
2343
2402
  classifyTxRetryDecision,
@@ -2,11 +2,11 @@ import {
2
2
  classifyErrorArea,
3
3
  isInteractive,
4
4
  promptYesNo
5
- } from "./chunk-C5ICDZ65.js";
5
+ } from "./chunk-23U57PZI.js";
6
6
  import {
7
7
  VERSION,
8
8
  getCurrentSentryTraceId
9
- } from "./chunk-QNRCWCBP.js";
9
+ } from "./chunk-VS36INHV.js";
10
10
 
11
11
  // src/bug-report.ts
12
12
  import { execSync, execFileSync } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  captureWarning
3
- } from "./chunk-QNRCWCBP.js";
3
+ } from "./chunk-VS36INHV.js";
4
4
 
5
5
  // src/chunk-probe.ts
6
6
  import { Twox128, Blake2128Concat, decAnyMetadata, unifyMetadata } from "@polkadot-api/substrate-bindings";
@@ -20,10 +20,10 @@ import {
20
20
  } from "./chunk-S7EM5VMW.js";
21
21
  import {
22
22
  setDeployContext
23
- } from "./chunk-QMD4BWPM.js";
23
+ } from "./chunk-B6MBXUCT.js";
24
24
  import {
25
25
  probeChunks
26
- } from "./chunk-YZT3SWSV.js";
26
+ } from "./chunk-DCZYQCEG.js";
27
27
  import {
28
28
  packSection
29
29
  } from "./chunk-C2TS5MER.js";
@@ -35,7 +35,7 @@ import {
35
35
  parseDomainName,
36
36
  popStatusName,
37
37
  verifyNonceAdvanced
38
- } from "./chunk-ZCHDCZVP.js";
38
+ } from "./chunk-5OEGCTMJ.js";
39
39
  import {
40
40
  derivePoolAccounts,
41
41
  detectTestnet,
@@ -43,7 +43,7 @@ import {
43
43
  fetchPoolAuthorizations,
44
44
  selectAccount,
45
45
  topUpBy
46
- } from "./chunk-QMYW3D6E.js";
46
+ } from "./chunk-GSATPVTP.js";
47
47
  import {
48
48
  VERSION,
49
49
  captureWarning,
@@ -57,13 +57,13 @@ import {
57
57
  truncateAddress,
58
58
  withDeploySpan,
59
59
  withSpan
60
- } from "./chunk-QNRCWCBP.js";
60
+ } from "./chunk-VS36INHV.js";
61
61
  import {
62
62
  DEFAULT_ENV_ID,
63
63
  getPopSelfServeConfig,
64
64
  loadEnvironments,
65
65
  resolveEndpoints
66
- } from "./chunk-OITUIM2E.js";
66
+ } from "./chunk-HZKRLQLG.js";
67
67
  import {
68
68
  NonRetryableError
69
69
  } from "./chunk-ZOC4GITL.js";
@@ -232,23 +232,11 @@ async function getProvider() {
232
232
  await cryptoWaitReady();
233
233
  const poolMnemonic = process.env.BULLETIN_POOL_MNEMONIC || void 0;
234
234
  const poolAccounts = derivePoolAccounts(POOL_SIZE, poolMnemonic);
235
- const [authorizations, currentBlockForPool] = await Promise.all([
236
- fetchPoolAuthorizations(unsafeApi, poolAccounts),
237
- unsafeApi.query.System.Number.getValue()
238
- ]);
239
- const selectionResult = selectAccount(authorizations, Math.random, currentBlockForPool);
240
- let selectedAccount;
241
- let eligibleCount = 0;
242
- if (!selectionResult) {
243
- const best = authorizations.reduce((a, b) => a.transactions > b.transactions ? a : b);
244
- console.log(` All pool accounts low on capacity, auto-authorizing account ${best.index}...`);
245
- await ensureAuthorized(unsafeApi, best.address, `pool account ${best.index}`);
246
- selectedAccount = best;
247
- } else {
248
- selectedAccount = selectionResult.account;
249
- eligibleCount = selectionResult.eligibleCount;
250
- await ensureAuthorized(unsafeApi, selectedAccount.address, `pool account ${selectedAccount.index}`);
251
- }
235
+ const authorizations = await fetchPoolAuthorizations(unsafeApi, poolAccounts);
236
+ const selectionResult = selectAccount(authorizations);
237
+ const selectedAccount = selectionResult.account;
238
+ const eligibleCount = selectionResult.eligibleCount;
239
+ await ensureAuthorized(unsafeApi, selectedAccount.address, `pool account ${selectedAccount.index}`);
252
240
  console.log(` Using pool account ${selectedAccount.index}: ${selectedAccount.address}`);
253
241
  setDeployAttribute("deploy.signer.mode", "pool");
254
242
  setDeployAttribute("deploy.pool.account", truncateAddress(selectedAccount.address));
@@ -260,7 +248,7 @@ async function getProvider() {
260
248
  throw e;
261
249
  }
262
250
  }
263
- async function getDirectProvider(mnemonic, derivationPath = "", bulletinAuthorizeV2) {
251
+ async function getDirectProvider(mnemonic, derivationPath = "") {
264
252
  const primary = BULLETIN_ENDPOINTS[0];
265
253
  console.log(` Connecting to Bulletin: ${primary}`);
266
254
  const client = createPolkadotClient(getWsProvider(
@@ -277,7 +265,7 @@ async function getDirectProvider(mnemonic, derivationPath = "", bulletinAuthoriz
277
265
  let now = currentBlock.number;
278
266
  if (!auth || Number(auth.expiration ?? 0) <= now) {
279
267
  try {
280
- await ensureAuthorized(unsafeApi, ss58, "direct signer", bulletinAuthorizeV2);
268
+ await ensureAuthorized(unsafeApi, ss58, "direct signer");
281
269
  [auth, currentBlock] = await Promise.all([
282
270
  unsafeApi.query.TransactionStorage.Authorizations.getValue(Enum("Account", ss58)),
283
271
  client.getFinalizedBlock()
@@ -411,7 +399,7 @@ function assignDenseNonces(stored, startNonce) {
411
399
  return nonces;
412
400
  }
413
401
  var __assignDenseNoncesForTest = assignDenseNonces;
414
- async function storeChunkedContent(chunks, { client: existingClient, unsafeApi: existingApi, signer: existingSigner, ss58: existingSS58, reconnect, fetchNonce: fetchNonceOverride, skipCids, probeFailedCids, gateway: providerGateway, bulletinAuthorizeV2, trustedCids, skipRootStore } = {}) {
402
+ async function storeChunkedContent(chunks, { client: existingClient, unsafeApi: existingApi, signer: existingSigner, ss58: existingSS58, reconnect, fetchNonce: fetchNonceOverride, skipCids, probeFailedCids, gateway: providerGateway, trustedCids, skipRootStore } = {}) {
415
403
  const _fetchNonce = fetchNonceOverride ?? fetchNonce;
416
404
  console.log(`
417
405
  Chunks: ${chunks.length}`);
@@ -483,7 +471,7 @@ async function storeChunkedContent(chunks, { client: existingClient, unsafeApi:
483
471
  Account needs re-authorization (authorized=${isAuthorized}, need ${requiredTxs} txs / ${(totalBytes / 1e6).toFixed(1)}MB, have ${txsRemainingDisplay} txs / ${(Number(bytesRemainingDisplay) / 1e6).toFixed(2)}MB)`);
484
472
  console.log(` Attempting to re-authorize with Alice...`);
485
473
  try {
486
- await ensureAuthorized(unsafeApi, ss58, void 0, bulletinAuthorizeV2, { txs: requiredTxs, bytes: requiredBytes });
474
+ await ensureAuthorized(unsafeApi, ss58, void 0, { txs: requiredTxs, bytes: requiredBytes });
487
475
  console.log(` Re-authorization successful`);
488
476
  } catch (e) {
489
477
  throw new NonRetryableError(`Account ${ss58} has insufficient Bulletin authorization and auto-authorization via Alice failed (${e.message}). Authorize the account on-chain.`);
@@ -1552,7 +1540,6 @@ async function deploy(content, domainName = null, options = {}) {
1552
1540
  let envIpfs;
1553
1541
  let envAutoAccountMapping = false;
1554
1542
  let envContracts = {};
1555
- let envBulletinAuthorizeV2 = false;
1556
1543
  let envNativeToEthRatio;
1557
1544
  let envRegisterStorageDeposit;
1558
1545
  let envPopSelfServe = null;
@@ -1571,7 +1558,6 @@ async function deploy(content, domainName = null, options = {}) {
1571
1558
  envIpfs = resolved.ipfs;
1572
1559
  envAutoAccountMapping = resolved.autoAccountMapping;
1573
1560
  envContracts = resolved.contracts;
1574
- envBulletinAuthorizeV2 = resolved.bulletinAuthorizeV2;
1575
1561
  envNativeToEthRatio = resolved.nativeToEthRatio;
1576
1562
  envRegisterStorageDeposit = resolved.registerStorageDeposit;
1577
1563
  envPopSelfServe = getPopSelfServeConfig(doc, envId);
@@ -1614,7 +1600,7 @@ async function deploy(content, domainName = null, options = {}) {
1614
1600
  if (process.env.CI) console.log(` Runner: ${resolveRunner()} (${resolveRunnerType()})`);
1615
1601
  if (options.password) console.log(` Encrypted: yes`);
1616
1602
  let provider;
1617
- const reconnect = options.mnemonic ? () => getDirectProvider(options.mnemonic, options.derivationPath, envBulletinAuthorizeV2) : () => getProvider();
1603
+ const reconnect = options.mnemonic ? () => getDirectProvider(options.mnemonic, options.derivationPath) : () => getProvider();
1618
1604
  let dotnsPreflight = null;
1619
1605
  let previousContenthashCid = null;
1620
1606
  try {
@@ -1668,7 +1654,7 @@ async function deploy(content, domainName = null, options = {}) {
1668
1654
  }
1669
1655
  }
1670
1656
  provider = await reconnect();
1671
- const providerWithReconnect = { ...provider, reconnect, bulletinAuthorizeV2: envBulletinAuthorizeV2 };
1657
+ const providerWithReconnect = { ...provider, reconnect };
1672
1658
  const [isTestnet, estimated] = await Promise.all([
1673
1659
  detectTestnet(provider.unsafeApi),
1674
1660
  estimateUploadBytes(content)
@@ -1678,7 +1664,7 @@ async function deploy(content, domainName = null, options = {}) {
1678
1664
  const uploadBytes = Math.ceil(estimated * 1.2);
1679
1665
  const chunksNeeded = Math.max(1, Math.ceil(uploadBytes / CHUNK_SIZE));
1680
1666
  const needs = { txs: BigInt(chunksNeeded + 2), bytes: BigInt(uploadBytes) };
1681
- await topUpBy(provider.unsafeApi, provider.ss58, needs, "uploader", envBulletinAuthorizeV2);
1667
+ await topUpBy(provider.unsafeApi, provider.ss58, needs, "uploader");
1682
1668
  }
1683
1669
  console.log("\n" + "=".repeat(60));
1684
1670
  console.log("Storage");
@@ -1,3 +1,7 @@
1
+ import {
2
+ setDeployAttribute
3
+ } from "./chunk-VS36INHV.js";
4
+
1
5
  // src/pool.ts
2
6
  import { sr25519CreateDerive } from "@polkadot-labs/hdkd";
3
7
  import { DEV_PHRASE, entropyToMiniSecret, mnemonicToEntropy } from "@polkadot-labs/hdkd-helpers";
@@ -14,7 +18,6 @@ var DEPLOY_PATH_PREFIX = "//deploy";
14
18
  var TOPUP_TRANSACTIONS = 1e3;
15
19
  var TOPUP_BYTES = 100000000n;
16
20
  var WS_HEARTBEAT_TIMEOUT_MS = 3e5;
17
- var AUTHORIZATION_EXTENSION_BLOCKS = 2e6;
18
21
  function derivePoolAccounts(poolSize = 10, mnemonic = DEV_PHRASE) {
19
22
  const entropy = mnemonicToEntropy(mnemonic);
20
23
  const miniSecret = entropyToMiniSecret(entropy);
@@ -30,23 +33,19 @@ function derivePoolAccounts(poolSize = 10, mnemonic = DEV_PHRASE) {
30
33
  }
31
34
  return accounts;
32
35
  }
33
- function isAuthorizationSufficient(auth, currentBlock, check = {}) {
36
+ function isAuthorizationSufficient(auth, currentBlock, needs) {
34
37
  if (auth === void 0) return false;
35
38
  if (Number(auth.expiration ?? 0) <= currentBlock) return false;
36
- if (check.bulletinAuthorizeV2 && check.needs) {
39
+ if (needs) {
37
40
  const txsRemaining = BigInt(auth.extent.transactions_allowance) - BigInt(auth.extent.transactions);
38
41
  const bytesRemaining = BigInt(auth.extent.bytes_allowance) - BigInt(auth.extent.bytes);
39
- if (txsRemaining < check.needs.txs) return false;
40
- if (bytesRemaining < check.needs.bytes) return false;
42
+ if (txsRemaining < needs.txs) return false;
43
+ if (bytesRemaining < needs.bytes) return false;
41
44
  }
42
45
  return true;
43
46
  }
44
- function selectAccount(authorizations, random = Math.random, currentBlock) {
45
- const eligible = authorizations.filter(
46
- (a) => currentBlock === void 0 || a.expiration > currentBlock
47
- );
48
- if (eligible.length === 0) return null;
49
- return { account: eligible[Math.floor(random() * eligible.length)], eligibleCount: eligible.length };
47
+ function selectAccount(authorizations, random = Math.random) {
48
+ return { account: authorizations[Math.floor(random() * authorizations.length)], eligibleCount: authorizations.length };
50
49
  }
51
50
  async function fetchPoolAuthorizations(api, accounts) {
52
51
  const results = await Promise.all(
@@ -145,83 +144,59 @@ function clampU32(n, name) {
145
144
  if (n > U32_MAX) throw new Error(`${name} (${n}) exceeds u32 max \u2014 split the deploy into smaller batches`);
146
145
  return Number(n);
147
146
  }
148
- async function ensureAuthorized(api, address, label, bulletinAuthorizeV2, needs) {
147
+ function markBulletinAuthGranted() {
148
+ setDeployAttribute("deploy.unblock.bulletin_auth.fired", "true");
149
+ setDeployAttribute("deploy.unblock.bulletin_auth.granted_txs", String(TOPUP_TRANSACTIONS));
150
+ setDeployAttribute("deploy.unblock.bulletin_auth.granted_bytes", String(TOPUP_BYTES));
151
+ }
152
+ async function ensureAuthorized(api, address, label, needs) {
149
153
  const [auth, currentBlock] = await Promise.all([
150
154
  api.query.TransactionStorage.Authorizations.getValue(Enum("Account", address)),
151
155
  api.query.System.Number.getValue()
152
156
  ]);
153
- if (isAuthorizationSufficient(auth, currentBlock, { needs, bulletinAuthorizeV2 })) return;
157
+ if (isAuthorizationSufficient(auth, currentBlock, needs)) return;
154
158
  console.log(` Auto-authorizing ${label ?? "account"} (${address.slice(0, 8)}...)...`);
155
159
  const { signer } = aliceKeyring();
156
- if (bulletinAuthorizeV2) {
157
- await submitAliceTxWithRetry(
158
- () => api.tx.TransactionStorage.authorize_account({
159
- who: address,
160
- transactions: clampU32(BigInt(TOPUP_TRANSACTIONS), "transactions"),
161
- bytes: TOPUP_BYTES
162
- }),
163
- signer,
164
- `authorize_account(${label ?? "account"})`
165
- );
166
- console.log(` Authorized: ${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB`);
167
- } else {
168
- const newExpiration = currentBlock + AUTHORIZATION_EXTENSION_BLOCKS;
169
- await submitAliceTxWithRetry(
170
- () => api.tx.TransactionStorage.authorize_account({
171
- who: address,
172
- expiration: newExpiration
173
- }),
174
- signer,
175
- `authorize_account(${label ?? "account"})`
176
- );
177
- console.log(` Authorized: expires at block ${newExpiration} (current: ${currentBlock})`);
178
- }
160
+ await submitAliceTxWithRetry(
161
+ () => api.tx.TransactionStorage.authorize_account({
162
+ who: address,
163
+ transactions: clampU32(BigInt(TOPUP_TRANSACTIONS), "transactions"),
164
+ bytes: TOPUP_BYTES
165
+ }),
166
+ signer,
167
+ `authorize_account(${label ?? "account"})`
168
+ );
169
+ console.log(` Authorized: ${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB`);
170
+ markBulletinAuthGranted();
179
171
  }
180
- async function topUpBy(api, address, needs, label, bulletinAuthorizeV2) {
172
+ async function topUpBy(api, address, needs, label) {
181
173
  const [currentAuth, currentBlock] = await Promise.all([
182
174
  api.query.TransactionStorage.Authorizations.getValue(Enum("Account", address)),
183
175
  api.query.System.Number.getValue()
184
176
  ]);
185
- if (isAuthorizationSufficient(currentAuth, currentBlock, { needs, bulletinAuthorizeV2 })) {
177
+ if (isAuthorizationSufficient(currentAuth, currentBlock, needs)) {
186
178
  const expiration = Number(currentAuth.expiration);
187
- if (currentAuth.extent) {
188
- const fmtMB = (b) => (Number(b) / 1e6).toFixed(1);
189
- const txsRemaining = BigInt(currentAuth.extent.transactions_allowance) - BigInt(currentAuth.extent.transactions);
190
- const bytesRemaining = BigInt(currentAuth.extent.bytes_allowance) - BigInt(currentAuth.extent.bytes);
191
- console.log(` Pre-auth skipped for ${label ?? "account"} (${address.slice(0, 8)}...): authorized until block ${expiration}, ${txsRemaining} txs / ${fmtMB(bytesRemaining)}MB remaining.`);
192
- } else {
193
- console.log(` Pre-auth skipped for ${label ?? "account"} (${address.slice(0, 8)}...): authorized until block ${expiration}.`);
194
- }
179
+ const fmtMB = (b) => (Number(b) / 1e6).toFixed(1);
180
+ const txsRemaining = BigInt(currentAuth.extent.transactions_allowance) - BigInt(currentAuth.extent.transactions);
181
+ const bytesRemaining = BigInt(currentAuth.extent.bytes_allowance) - BigInt(currentAuth.extent.bytes);
182
+ console.log(` Pre-auth skipped for ${label ?? "account"} (${address.slice(0, 8)}...): authorized until block ${expiration}, ${txsRemaining} txs / ${fmtMB(bytesRemaining)}MB remaining.`);
195
183
  return;
196
184
  }
197
185
  const { signer } = aliceKeyring();
198
- if (bulletinAuthorizeV2) {
199
- console.log(` Pre-authorizing ${label ?? "account"} (${address.slice(0, 8)}...): granting ${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB...`);
200
- await submitAliceTxWithRetry(
201
- () => api.tx.TransactionStorage.authorize_account({
202
- who: address,
203
- transactions: clampU32(BigInt(TOPUP_TRANSACTIONS), "transactions"),
204
- bytes: TOPUP_BYTES
205
- }),
206
- signer,
207
- `topUpBy(${label ?? "account"})`
208
- );
209
- console.log(` Pre-authorized: ${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB`);
210
- } else {
211
- const newExpiration = currentBlock + AUTHORIZATION_EXTENSION_BLOCKS;
212
- console.log(` Pre-authorizing ${label ?? "account"} (${address.slice(0, 8)}...): extending authorization to block ${newExpiration}...`);
213
- await submitAliceTxWithRetry(
214
- () => api.tx.TransactionStorage.authorize_account({
215
- who: address,
216
- expiration: newExpiration
217
- }),
218
- signer,
219
- `topUpBy(${label ?? "account"})`
220
- );
221
- console.log(` Pre-authorized: expires at block ${newExpiration}`);
222
- }
186
+ console.log(` Pre-authorizing ${label ?? "account"} (${address.slice(0, 8)}...): granting ${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB...`);
187
+ await submitAliceTxWithRetry(
188
+ () => api.tx.TransactionStorage.authorize_account({
189
+ who: address,
190
+ transactions: clampU32(BigInt(TOPUP_TRANSACTIONS), "transactions"),
191
+ bytes: TOPUP_BYTES
192
+ }),
193
+ signer,
194
+ `topUpBy(${label ?? "account"})`
195
+ );
196
+ console.log(` Pre-authorized: ${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB`);
197
+ markBulletinAuthGranted();
223
198
  }
224
- async function bootstrapPool(bulletinRpc, poolSize = 10, mnemonic, opts = {}) {
199
+ async function bootstrapPool(bulletinRpc, poolSize = 10, mnemonic) {
225
200
  console.log(`Bootstrapping ${poolSize} pool accounts on ${bulletinRpc}...
226
201
  `);
227
202
  await cryptoWaitReady();
@@ -238,40 +213,19 @@ async function bootstrapPool(bulletinRpc, poolSize = 10, mnemonic, opts = {}) {
238
213
  const aliceBalance = BigInt(aliceAccount.data.free);
239
214
  console.log(`Alice balance: ${formatPasBalance(aliceBalance)} PAS
240
215
  `);
241
- const currentBlock = await api.query.System.Number.getValue();
242
- if (opts.bulletinAuthorizeV2) {
243
- console.log(`Authorizing accounts with V2 (${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB)
244
- `);
245
- } else {
246
- const authExpiration = currentBlock + AUTHORIZATION_EXTENSION_BLOCKS;
247
- console.log(`Authorizing accounts until block ${authExpiration} (current: ${currentBlock})
216
+ console.log(`Authorizing accounts (${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB)
248
217
  `);
249
- }
250
218
  for (const account of accounts) {
251
219
  console.log(`Account ${account.index}: ${account.address}`);
252
220
  try {
253
- let tx;
254
- if (opts.bulletinAuthorizeV2) {
255
- tx = api.tx.TransactionStorage.authorize_account({
256
- who: account.address,
257
- transactions: clampU32(BigInt(TOPUP_TRANSACTIONS), "transactions"),
258
- bytes: TOPUP_BYTES
259
- });
260
- } else {
261
- const authExpiration = currentBlock + AUTHORIZATION_EXTENSION_BLOCKS;
262
- tx = api.tx.TransactionStorage.authorize_account({
263
- who: account.address,
264
- expiration: authExpiration
265
- });
266
- }
221
+ const tx = api.tx.TransactionStorage.authorize_account({
222
+ who: account.address,
223
+ transactions: clampU32(BigInt(TOPUP_TRANSACTIONS), "transactions"),
224
+ bytes: TOPUP_BYTES
225
+ });
267
226
  const result = await tx.signAndSubmit(aliceSigner);
268
227
  if (!result.ok) throw new Error("dispatch failed");
269
- if (opts.bulletinAuthorizeV2) {
270
- console.log(` Authorized: ${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB`);
271
- } else {
272
- const authExpiration = currentBlock + AUTHORIZATION_EXTENSION_BLOCKS;
273
- console.log(` Authorized: expires at block ${authExpiration}`);
274
- }
228
+ console.log(` Authorized: ${TOPUP_TRANSACTIONS} txs / ${Number(TOPUP_BYTES) / 1e6}MB`);
275
229
  } catch (e) {
276
230
  console.log(` Authorization failed: ${e.message?.slice(0, 80)}`);
277
231
  }
@@ -17,7 +17,6 @@ var environments_default = {
17
17
  backend: "https://polkadot-app-stg.parity.io/",
18
18
  ipfs: "https://previewnet.substrate.dev",
19
19
  autoAccountMapping: true,
20
- bulletinAuthorizeV2: true,
21
20
  registerStorageDeposit: 2e12,
22
21
  contracts: {
23
22
  DOTNS_PROTOCOL_REGISTRY: "0xc07A2F24387DA27283CD87b9F24573b74C9e0c9b",
@@ -64,7 +63,6 @@ var environments_default = {
64
63
  ipfs: "https://paseo-bulletin-next-ipfs.polkadot.io",
65
64
  docsUrl: "https://sre.teleport.parity.io/environments/paseo-next/",
66
65
  autoAccountMapping: true,
67
- bulletinAuthorizeV2: true,
68
66
  nativeToEthRatio: 1e8,
69
67
  registerStorageDeposit: 2e12,
70
68
  popSelfServe: {
@@ -471,7 +469,6 @@ function resolveEndpoints(doc, envId) {
471
469
  envName: env.name,
472
470
  ipfs: env.ipfs,
473
471
  autoAccountMapping: env.autoAccountMapping ?? false,
474
- bulletinAuthorizeV2: env.bulletinAuthorizeV2 ?? false,
475
472
  contracts: env.contracts ?? {},
476
473
  nativeToEthRatio: BigInt(env.nativeToEthRatio ?? 1e6),
477
474
  ...env.registerStorageDeposit !== void 0 ? { registerStorageDeposit: BigInt(env.registerStorageDeposit) } : {}
@@ -6,7 +6,7 @@ import * as path from "path";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "bulletin-deploy",
9
- version: "0.7.28-rc.2",
9
+ version: "0.7.28",
10
10
  private: false,
11
11
  repository: {
12
12
  type: "git",
@@ -6,15 +6,15 @@ import {
6
6
  resolveDotnsConnectOptions,
7
7
  storeDirectory,
8
8
  storeFile
9
- } from "./chunk-5LWQOKOU.js";
9
+ } from "./chunk-EIP3OX6G.js";
10
10
  import {
11
11
  DotNS
12
- } from "./chunk-ZCHDCZVP.js";
12
+ } from "./chunk-5OEGCTMJ.js";
13
13
  import {
14
14
  getPopSelfServeConfig,
15
15
  loadEnvironments,
16
16
  resolveEndpoints
17
- } from "./chunk-OITUIM2E.js";
17
+ } from "./chunk-HZKRLQLG.js";
18
18
  import {
19
19
  NonRetryableError
20
20
  } from "./chunk-ZOC4GITL.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  package_default,
3
3
  writeRunState
4
- } from "./chunk-O6GP6JOD.js";
4
+ } from "./chunk-RDTUUXZM.js";
5
5
 
6
6
  // src/memory-report.ts
7
7
  import * as fs2 from "fs";
@@ -211,6 +211,10 @@ function getDeployAttributes(domain) {
211
211
  // testnet auto-top-up" metrics. Flipped by gateOnFeeBalance.
212
212
  "deploy.dotns.signer_below_floor": "false",
213
213
  "deploy.dotns.toppedup": "false",
214
+ // Seeded "false" so every span carries the attribute for ratio queries.
215
+ // Flipped to "true" by pool.ts ensureAuthorized / topUpBy when authorize_account
216
+ // actually submits (i.e. re-auth was needed, not short-circuited).
217
+ "deploy.unblock.bulletin_auth.fired": "false",
214
218
  // Seeded "hash" so spans missing an explicit set (non-DotNS deploys) group
215
219
  // cleanly in the "hash" bucket.
216
220
  "deploy.dotns.tx_resolution_kind": "hash",
@@ -276,7 +280,7 @@ function isExpectedError(msg) {
276
280
  }
277
281
  function classifyDeployError(msg) {
278
282
  if (isExpectedError(msg)) return "user";
279
- if (/chunk.*failed after.*retr|tx dropped from best chain|timed out after \d+s waiting for block|Contract reverted|Contract execution would revert|dotns register failed|All promises were rejected|"type"\s*:\s*"Invalid"|Commitment still too new|not finalised after \d+s|chain may have (dropped|evicted)|ReviveApi.*timed out/i.test(msg)) return "environment";
283
+ if (/chunk.*failed after.*retr|tx dropped from best chain|timed out after \d+s waiting for block|Contract reverted|Contract execution would revert|dotns register failed|All promises were rejected|"type"\s*:\s*"Invalid"|Commitment still too new|not finalised after \d+s|chain may have (dropped|evicted)|ReviveApi.*timed out|\b(?:commit|register|setSubnodeOwner|setResolver|setContenthash|setText|publish|unpublish|Revive\.call|Utility\.batch_all) timed out after \d+ms|transaction watcher silent for/i.test(msg)) return "environment";
280
284
  if (/javascript heap out of memory|allocation failed.*heap|External signer mode is not supported with dotns-cli/i.test(msg)) return "internal";
281
285
  return "unknown";
282
286
  }
@@ -301,13 +305,15 @@ var ERROR_KIND_RULES = [
301
305
  [/timed out after \d+s waiting for block|Transaction not included after \d+s|Transaction did not settle within/i, "chain-timeout"],
302
306
  [/\bstale\b.*nonce|nonce.*\bstale\b|"type"\s*:\s*"(?:Future|Stale)"|Invalid::Future|tx rejected by pool/i, "nonce-stale"],
303
307
  [/heartbeat timeout|WS halt|Unable to connect|ChainHead disjointed|websocket.*closed|socket closed|disconnect/i, "connection"],
304
- [/requires ProofOfPersonhoodFull,\s*but this signer is NoStatus/i, "naming.pop_required"],
308
+ [/requires ProofOfPersonhood(?:Full|Lite|Light),\s*but this signer is NoStatus/i, "naming.pop_required"],
305
309
  [/Domain\s+\S+\.dot\s+is already owned by\s+0x[a-fA-F0-9]+/i, "naming.already_owned"],
306
310
  [/Cannot deploy\s+[\w.-]+\.dot:\s*parent\s+[\w.-]+\.dot\s+is owned by/i, "naming.subdomain_orphan"],
307
311
  [/Post-deploy verification failed for .+: on-chain contenthash is /i, "verify.contenthash_mismatch"],
308
312
  [/Deploy verification failed:\s*DAG-PB root.+not finalised/i, "verify.dagpb_not_finalised"],
309
313
  [/Retry budget exhausted:.*recovery attempts/i, "network.recovery_exhausted"],
310
314
  [/ReviveApi\.\w+ timed out after \d+ms/i, "chain.api_timeout"],
315
+ [/transaction watcher silent for \d+s/i, "chain.tx_silent"],
316
+ [/^(?:commit|register|setSubnodeOwner|setResolver|setContenthash|setText|publish|unpublish|Revive\.call|Utility\.batch_all) timed out after \d+ms/i, "chain.tx_timeout"],
311
317
  [/^INVARIANT FAILED:/i, "tool.invariant"]
312
318
  ];
313
319
  function classifyErrorKind(msg) {
@@ -5,9 +5,9 @@ import {
5
5
  _decodeStorageValue,
6
6
  _resetProbeSession,
7
7
  probeChunks
8
- } from "./chunk-YZT3SWSV.js";
9
- import "./chunk-QNRCWCBP.js";
10
- import "./chunk-O6GP6JOD.js";
8
+ } from "./chunk-DCZYQCEG.js";
9
+ import "./chunk-VS36INHV.js";
10
+ import "./chunk-RDTUUXZM.js";
11
11
  export {
12
12
  ChainProbeCrossValidationError,
13
13
  ChainProbeMetadataError,
package/dist/deploy.d.ts CHANGED
@@ -29,7 +29,6 @@ interface ExistingProvider {
29
29
  skipCids?: Set<string>;
30
30
  probeFailedCids?: Set<string>;
31
31
  gateway?: string;
32
- bulletinAuthorizeV2?: boolean;
33
32
  /**
34
33
  * CIDs the caller vouches are already on-chain. Chunks matching these CIDs
35
34
  * are skipped without any re-probe (unlike `skipCids` which re-probes before
@@ -86,7 +85,7 @@ declare function storeFile(contentBytes: Uint8Array, { client: existingClient, u
86
85
  */
87
86
  declare function assignDenseNonces(stored: (StoredChunk | null)[], startNonce: number): Map<number, number>;
88
87
  declare const __assignDenseNoncesForTest: typeof assignDenseNonces;
89
- declare function storeChunkedContent(chunks: Uint8Array[], { client: existingClient, unsafeApi: existingApi, signer: existingSigner, ss58: existingSS58, reconnect, fetchNonce: fetchNonceOverride, skipCids, probeFailedCids, gateway: providerGateway, bulletinAuthorizeV2, trustedCids, skipRootStore }?: ExistingProvider): Promise<{
88
+ declare function storeChunkedContent(chunks: Uint8Array[], { client: existingClient, unsafeApi: existingApi, signer: existingSigner, ss58: existingSS58, reconnect, fetchNonce: fetchNonceOverride, skipCids, probeFailedCids, gateway: providerGateway, trustedCids, skipRootStore }?: ExistingProvider): Promise<{
90
89
  storageCid: string;
91
90
  tier2Verified: number;
92
91
  tier2Inconclusive: number;
package/dist/deploy.js CHANGED
@@ -35,20 +35,20 @@ import {
35
35
  storeDirectoryV2,
36
36
  storeFile,
37
37
  unpublish
38
- } from "./chunk-5LWQOKOU.js";
38
+ } from "./chunk-EIP3OX6G.js";
39
39
  import "./chunk-IW3X2MJF.js";
40
40
  import "./chunk-KOSF5FDO.js";
41
41
  import "./chunk-L2SKSKB6.js";
42
42
  import "./chunk-S7EM5VMW.js";
43
- import "./chunk-QMD4BWPM.js";
44
- import "./chunk-C5ICDZ65.js";
45
- import "./chunk-YZT3SWSV.js";
43
+ import "./chunk-B6MBXUCT.js";
44
+ import "./chunk-23U57PZI.js";
45
+ import "./chunk-DCZYQCEG.js";
46
46
  import "./chunk-C2TS5MER.js";
47
- import "./chunk-ZCHDCZVP.js";
48
- import "./chunk-QMYW3D6E.js";
49
- import "./chunk-QNRCWCBP.js";
50
- import "./chunk-O6GP6JOD.js";
51
- import "./chunk-OITUIM2E.js";
47
+ import "./chunk-5OEGCTMJ.js";
48
+ import "./chunk-GSATPVTP.js";
49
+ import "./chunk-VS36INHV.js";
50
+ import "./chunk-RDTUUXZM.js";
51
+ import "./chunk-HZKRLQLG.js";
52
52
  import {
53
53
  EXIT_CODE_NO_RETRY,
54
54
  NonRetryableError
package/dist/dotns.d.ts CHANGED
@@ -112,6 +112,7 @@ declare const OPERATION_TIMEOUT_MS: number;
112
112
  declare const TX_TIMEOUT_MS: number;
113
113
  declare const TX_CHAIN_TIME_BUDGET_MS: number;
114
114
  declare const TX_WALL_CLOCK_CEILING_MS: number;
115
+ declare const TX_NO_PROGRESS_MS: number;
115
116
  declare const WS_HEARTBEAT_TIMEOUT_MS: number;
116
117
  declare const DOTNS_TX_MAX_ATTEMPTS: number;
117
118
  declare function classifyTxRetryDecision(err: unknown): "retry" | "abort";
@@ -231,6 +232,7 @@ declare function stripTrailingDigits(label: string): string;
231
232
  declare function sanitizeDomainLabel(label: string): string;
232
233
  declare function validateDomainLabel(label: string, opts?: {
233
234
  checkReserved?: boolean;
235
+ skipSanitize?: boolean;
234
236
  }): string;
235
237
  declare function isCommitmentMature(chainNowSeconds: number, commitTimestampSeconds: number, minimumAgeSeconds: number): boolean;
236
238
  declare function isCommitmentTimingBarerevert(msg: string): boolean;
@@ -510,4 +512,4 @@ declare class DotNS {
510
512
  }
511
513
  declare const dotns: DotNS;
512
514
 
513
- export { ATTR_TX_RESOLUTION_KIND, type AliasAccountClassification, type AliasAccountState, CONNECTION_TIMEOUT_MS, CONTRACTS, ContractDryRunRevertError, DECIMALS, DEFAULT_MNEMONIC, DOTNS_TX_MAX_ATTEMPTS, DOT_NODE, DotNS, type DotNSConnectOptions, type DotnsPreflightResult, type DotnsSuccessAction, MINIMUM_REGISTER_STORAGE_DEPOSIT, NATIVE_TO_ETH_RATIO, OPERATION_TIMEOUT_MS, type OwnershipResult, PUBLISHER_ABI, type ParsedDomainName, type PriceValidationResult, ProofOfPersonhoodStatus, PublisherNotSupportedError, RPC_ENDPOINTS, TX_CHAIN_TIME_BUDGET_MS, TX_KIND_HASH, TX_KIND_NONCE_ADVANCED, TX_TIMEOUT_MS, TX_WALL_CLOCK_CEILING_MS, type TxResolution, WS_HEARTBEAT_TIMEOUT_MS, __formatContractDryRunFailureForTest, canRegister, classifyDotnsLabel, classifyTxRetryDecision, computeDomainTokenId, convertToHexString, convertWeiToNative, countTrailingDigits, decodePublisherRevert, dotns, feeFloorFor, fetchNonce, fmtPas, formatDispatchError, formatPersonhoodRemediation, formatPopShortfallReason, isCommitmentMature, isCommitmentTimingBarerevert, parseDomainName, parseProofOfPersonhoodStatus, popStatusName, sanitizeDomainLabel, stripTrailingDigits, validateDomainLabel, verifyNonceAdvanced };
515
+ export { ATTR_TX_RESOLUTION_KIND, type AliasAccountClassification, type AliasAccountState, CONNECTION_TIMEOUT_MS, CONTRACTS, ContractDryRunRevertError, DECIMALS, DEFAULT_MNEMONIC, DOTNS_TX_MAX_ATTEMPTS, DOT_NODE, DotNS, type DotNSConnectOptions, type DotnsPreflightResult, type DotnsSuccessAction, MINIMUM_REGISTER_STORAGE_DEPOSIT, NATIVE_TO_ETH_RATIO, OPERATION_TIMEOUT_MS, type OwnershipResult, PUBLISHER_ABI, type ParsedDomainName, type PriceValidationResult, ProofOfPersonhoodStatus, PublisherNotSupportedError, RPC_ENDPOINTS, TX_CHAIN_TIME_BUDGET_MS, TX_KIND_HASH, TX_KIND_NONCE_ADVANCED, TX_NO_PROGRESS_MS, TX_TIMEOUT_MS, TX_WALL_CLOCK_CEILING_MS, type TxResolution, WS_HEARTBEAT_TIMEOUT_MS, __formatContractDryRunFailureForTest, canRegister, classifyDotnsLabel, classifyTxRetryDecision, computeDomainTokenId, convertToHexString, convertWeiToNative, countTrailingDigits, decodePublisherRevert, dotns, feeFloorFor, fetchNonce, fmtPas, formatDispatchError, formatPersonhoodRemediation, formatPopShortfallReason, isCommitmentMature, isCommitmentTimingBarerevert, parseDomainName, parseProofOfPersonhoodStatus, popStatusName, sanitizeDomainLabel, stripTrailingDigits, validateDomainLabel, verifyNonceAdvanced };
package/dist/dotns.js CHANGED
@@ -18,6 +18,7 @@ import {
18
18
  TX_CHAIN_TIME_BUDGET_MS,
19
19
  TX_KIND_HASH,
20
20
  TX_KIND_NONCE_ADVANCED,
21
+ TX_NO_PROGRESS_MS,
21
22
  TX_TIMEOUT_MS,
22
23
  TX_WALL_CLOCK_CEILING_MS,
23
24
  WS_HEARTBEAT_TIMEOUT_MS,
@@ -46,11 +47,11 @@ import {
46
47
  stripTrailingDigits,
47
48
  validateDomainLabel,
48
49
  verifyNonceAdvanced
49
- } from "./chunk-ZCHDCZVP.js";
50
- import "./chunk-QMYW3D6E.js";
51
- import "./chunk-QNRCWCBP.js";
52
- import "./chunk-O6GP6JOD.js";
53
- import "./chunk-OITUIM2E.js";
50
+ } from "./chunk-5OEGCTMJ.js";
51
+ import "./chunk-GSATPVTP.js";
52
+ import "./chunk-VS36INHV.js";
53
+ import "./chunk-RDTUUXZM.js";
54
+ import "./chunk-HZKRLQLG.js";
54
55
  import "./chunk-ZOC4GITL.js";
55
56
  export {
56
57
  ATTR_TX_RESOLUTION_KIND,
@@ -72,6 +73,7 @@ export {
72
73
  TX_CHAIN_TIME_BUDGET_MS,
73
74
  TX_KIND_HASH,
74
75
  TX_KIND_NONCE_ADVANCED,
76
+ TX_NO_PROGRESS_MS,
75
77
  TX_TIMEOUT_MS,
76
78
  TX_WALL_CLOCK_CEILING_MS,
77
79
  WS_HEARTBEAT_TIMEOUT_MS,
@@ -25,7 +25,6 @@ interface Environment {
25
25
  ipfs?: string;
26
26
  uptimeUrl?: string;
27
27
  autoAccountMapping?: boolean;
28
- bulletinAuthorizeV2?: boolean;
29
28
  nativeToEthRatio?: number;
30
29
  registerStorageDeposit?: number;
31
30
  contracts?: Record<string, string>;
@@ -62,7 +61,6 @@ interface ResolvedEndpoints {
62
61
  envName: string;
63
62
  ipfs?: string;
64
63
  autoAccountMapping: boolean;
65
- bulletinAuthorizeV2: boolean;
66
64
  contracts: Record<string, string>;
67
65
  nativeToEthRatio: bigint;
68
66
  registerStorageDeposit?: bigint;
@@ -8,7 +8,7 @@ import {
8
8
  loadEnvironments,
9
9
  resolveEndpoints,
10
10
  validateContractAddresses
11
- } from "./chunk-OITUIM2E.js";
11
+ } from "./chunk-HZKRLQLG.js";
12
12
  import "./chunk-ZOC4GITL.js";
13
13
  export {
14
14
  DEFAULT_ENV_ID,
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-MMAZFJDG.js";
8
8
  import {
9
9
  publishManifest
10
- } from "./chunk-POA4GHYP.js";
10
+ } from "./chunk-UY6S4E3A.js";
11
11
  import {
12
12
  DEFAULT_TEXT_RECORD_BUDGET_BYTES,
13
13
  PLACEHOLDER_CID,
@@ -24,7 +24,7 @@ import {
24
24
  deploy,
25
25
  merkleizeJS,
26
26
  merkleizeWithStableOrder
27
- } from "./chunk-5LWQOKOU.js";
27
+ } from "./chunk-EIP3OX6G.js";
28
28
  import {
29
29
  computeStats,
30
30
  renderSummary,
@@ -46,26 +46,26 @@ import {
46
46
  isVolatilePath,
47
47
  parseManifest
48
48
  } from "./chunk-S7EM5VMW.js";
49
- import "./chunk-QMD4BWPM.js";
50
- import "./chunk-C5ICDZ65.js";
49
+ import "./chunk-B6MBXUCT.js";
50
+ import "./chunk-23U57PZI.js";
51
51
  import {
52
52
  probeChunks
53
- } from "./chunk-YZT3SWSV.js";
53
+ } from "./chunk-DCZYQCEG.js";
54
54
  import "./chunk-C2TS5MER.js";
55
55
  import {
56
56
  DEFAULT_MNEMONIC,
57
57
  DotNS,
58
58
  parseDomainName,
59
59
  sanitizeDomainLabel
60
- } from "./chunk-ZCHDCZVP.js";
60
+ } from "./chunk-5OEGCTMJ.js";
61
61
  import {
62
62
  bootstrapPool,
63
63
  derivePoolAccounts,
64
64
  ensureAuthorized,
65
65
  fetchPoolAuthorizations,
66
66
  selectAccount
67
- } from "./chunk-QMYW3D6E.js";
68
- import "./chunk-QNRCWCBP.js";
67
+ } from "./chunk-GSATPVTP.js";
68
+ import "./chunk-VS36INHV.js";
69
69
  import {
70
70
  VERSION,
71
71
  loadRunState,
@@ -75,7 +75,7 @@ import {
75
75
  shouldSkipStaleWarning,
76
76
  stateFilePath,
77
77
  writeRunState
78
- } from "./chunk-O6GP6JOD.js";
78
+ } from "./chunk-RDTUUXZM.js";
79
79
  import {
80
80
  DEFAULT_ENV_ID,
81
81
  defaultBundledPath,
@@ -85,7 +85,7 @@ import {
85
85
  loadEnvironments,
86
86
  resolveEndpoints,
87
87
  validateContractAddresses
88
- } from "./chunk-OITUIM2E.js";
88
+ } from "./chunk-HZKRLQLG.js";
89
89
  import "./chunk-ZOC4GITL.js";
90
90
  import "./chunk-HOTQDYHD.js";
91
91
  export {
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  publishManifest
3
- } from "../chunk-POA4GHYP.js";
3
+ } from "../chunk-UY6S4E3A.js";
4
4
  import "../chunk-RI3ZLNPN.js";
5
- import "../chunk-5LWQOKOU.js";
5
+ import "../chunk-EIP3OX6G.js";
6
6
  import "../chunk-IW3X2MJF.js";
7
7
  import "../chunk-KOSF5FDO.js";
8
8
  import "../chunk-L2SKSKB6.js";
9
9
  import "../chunk-S7EM5VMW.js";
10
- import "../chunk-QMD4BWPM.js";
11
- import "../chunk-C5ICDZ65.js";
12
- import "../chunk-YZT3SWSV.js";
10
+ import "../chunk-B6MBXUCT.js";
11
+ import "../chunk-23U57PZI.js";
12
+ import "../chunk-DCZYQCEG.js";
13
13
  import "../chunk-C2TS5MER.js";
14
- import "../chunk-ZCHDCZVP.js";
15
- import "../chunk-QMYW3D6E.js";
16
- import "../chunk-QNRCWCBP.js";
17
- import "../chunk-O6GP6JOD.js";
18
- import "../chunk-OITUIM2E.js";
14
+ import "../chunk-5OEGCTMJ.js";
15
+ import "../chunk-GSATPVTP.js";
16
+ import "../chunk-VS36INHV.js";
17
+ import "../chunk-RDTUUXZM.js";
18
+ import "../chunk-HZKRLQLG.js";
19
19
  import "../chunk-ZOC4GITL.js";
20
20
  import "../chunk-HOTQDYHD.js";
21
21
  export {
@@ -5,8 +5,8 @@ import {
5
5
  maybeWriteMemoryReport,
6
6
  safeHeap,
7
7
  sampleFromBytes
8
- } from "./chunk-QNRCWCBP.js";
9
- import "./chunk-O6GP6JOD.js";
8
+ } from "./chunk-VS36INHV.js";
9
+ import "./chunk-RDTUUXZM.js";
10
10
  export {
11
11
  DEFAULT_THRESHOLD_MB,
12
12
  buildMemoryReport,
package/dist/merkle.js CHANGED
@@ -6,20 +6,20 @@ import {
6
6
  merkleizeKuboBackend,
7
7
  merkleizeWithStableOrder,
8
8
  rebuildOrderedCarFromBytes
9
- } from "./chunk-5LWQOKOU.js";
9
+ } from "./chunk-EIP3OX6G.js";
10
10
  import "./chunk-IW3X2MJF.js";
11
11
  import "./chunk-KOSF5FDO.js";
12
12
  import "./chunk-L2SKSKB6.js";
13
13
  import "./chunk-S7EM5VMW.js";
14
- import "./chunk-QMD4BWPM.js";
15
- import "./chunk-C5ICDZ65.js";
16
- import "./chunk-YZT3SWSV.js";
14
+ import "./chunk-B6MBXUCT.js";
15
+ import "./chunk-23U57PZI.js";
16
+ import "./chunk-DCZYQCEG.js";
17
17
  import "./chunk-C2TS5MER.js";
18
- import "./chunk-ZCHDCZVP.js";
19
- import "./chunk-QMYW3D6E.js";
20
- import "./chunk-QNRCWCBP.js";
21
- import "./chunk-O6GP6JOD.js";
22
- import "./chunk-OITUIM2E.js";
18
+ import "./chunk-5OEGCTMJ.js";
19
+ import "./chunk-GSATPVTP.js";
20
+ import "./chunk-VS36INHV.js";
21
+ import "./chunk-RDTUUXZM.js";
22
+ import "./chunk-HZKRLQLG.js";
23
23
  import "./chunk-ZOC4GITL.js";
24
24
  import "./chunk-HOTQDYHD.js";
25
25
  export {
@@ -21,13 +21,13 @@ import {
21
21
  import "../chunk-UPWEOGLQ.js";
22
22
  import {
23
23
  WS_HEARTBEAT_TIMEOUT_MS
24
- } from "../chunk-ZCHDCZVP.js";
25
- import "../chunk-QMYW3D6E.js";
26
- import "../chunk-QNRCWCBP.js";
27
- import "../chunk-O6GP6JOD.js";
24
+ } from "../chunk-5OEGCTMJ.js";
25
+ import "../chunk-GSATPVTP.js";
26
+ import "../chunk-VS36INHV.js";
27
+ import "../chunk-RDTUUXZM.js";
28
28
  import {
29
29
  loadEnvironments
30
- } from "../chunk-OITUIM2E.js";
30
+ } from "../chunk-HZKRLQLG.js";
31
31
  import "../chunk-ZOC4GITL.js";
32
32
 
33
33
  // src/personhood/bootstrap.ts
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  WS_HEARTBEAT_TIMEOUT_MS
3
- } from "../chunk-ZCHDCZVP.js";
4
- import "../chunk-QMYW3D6E.js";
5
- import "../chunk-QNRCWCBP.js";
6
- import "../chunk-O6GP6JOD.js";
3
+ } from "../chunk-5OEGCTMJ.js";
4
+ import "../chunk-GSATPVTP.js";
5
+ import "../chunk-VS36INHV.js";
6
+ import "../chunk-RDTUUXZM.js";
7
7
  import {
8
8
  loadEnvironments
9
- } from "../chunk-OITUIM2E.js";
9
+ } from "../chunk-HZKRLQLG.js";
10
10
  import "../chunk-ZOC4GITL.js";
11
11
 
12
12
  // src/personhood/people-client.ts
package/dist/pool.d.ts CHANGED
@@ -14,16 +14,12 @@ interface PoolAuthorization extends PoolAccount {
14
14
  expiration: number;
15
15
  }
16
16
  declare function derivePoolAccounts(poolSize?: number, mnemonic?: string): PoolAccount[];
17
- interface AuthorizationCheck {
18
- needs?: AuthorizationNeeds;
19
- bulletinAuthorizeV2?: boolean;
20
- }
21
- declare function isAuthorizationSufficient(auth: any, currentBlock: number, check?: AuthorizationCheck): boolean;
17
+ declare function isAuthorizationSufficient(auth: any, currentBlock: number, needs?: AuthorizationNeeds): boolean;
22
18
  interface SelectionResult {
23
19
  account: PoolAuthorization;
24
20
  eligibleCount: number;
25
21
  }
26
- declare function selectAccount(authorizations: PoolAuthorization[], random?: () => number, currentBlock?: number): SelectionResult | null;
22
+ declare function selectAccount(authorizations: PoolAuthorization[], random?: () => number): SelectionResult;
27
23
  declare function fetchPoolAuthorizations(api: any, accounts: PoolAccount[]): Promise<PoolAuthorization[]>;
28
24
  interface AuthorizationNeeds {
29
25
  txs: bigint;
@@ -41,11 +37,8 @@ declare function classifyAliceTxError(err: unknown): TxRetryDecision;
41
37
  declare function isTestnetSpecName(specName: string | undefined | null): boolean;
42
38
  declare function detectTestnet(api: any): Promise<boolean>;
43
39
  declare function _resetTestnetCacheForTests(): void;
44
- declare function ensureAuthorized(api: any, address: string, label?: string, bulletinAuthorizeV2?: boolean, needs?: AuthorizationNeeds): Promise<void>;
45
- declare function topUpBy(api: any, address: string, needs: AuthorizationNeeds, label?: string, bulletinAuthorizeV2?: boolean): Promise<void>;
46
- interface BootstrapOptions {
47
- bulletinAuthorizeV2?: boolean;
48
- }
49
- declare function bootstrapPool(bulletinRpc: string, poolSize?: number, mnemonic?: string, opts?: BootstrapOptions): Promise<void>;
40
+ declare function ensureAuthorized(api: any, address: string, label?: string, needs?: AuthorizationNeeds): Promise<void>;
41
+ declare function topUpBy(api: any, address: string, needs: AuthorizationNeeds, label?: string): Promise<void>;
42
+ declare function bootstrapPool(bulletinRpc: string, poolSize?: number, mnemonic?: string): Promise<void>;
50
43
 
51
- export { type AuthorizationCheck, type AuthorizationNeeds, type BootstrapOptions, type PoolAccount, type PoolAuthorization, type SelectionResult, type TxRetryDecision, _resetTestnetCacheForTests, bootstrapPool, classifyAliceTxError, computeTopUpTarget, derivePoolAccounts, detectTestnet, ensureAuthorized, fetchPoolAuthorizations, formatPasBalance, isAuthorizationSufficient, isTestnetSpecName, selectAccount, topUpBy };
44
+ export { type AuthorizationNeeds, type PoolAccount, type PoolAuthorization, type SelectionResult, type TxRetryDecision, _resetTestnetCacheForTests, bootstrapPool, classifyAliceTxError, computeTopUpTarget, derivePoolAccounts, detectTestnet, ensureAuthorized, fetchPoolAuthorizations, formatPasBalance, isAuthorizationSufficient, isTestnetSpecName, selectAccount, topUpBy };
package/dist/pool.js CHANGED
@@ -12,7 +12,9 @@ import {
12
12
  isTestnetSpecName,
13
13
  selectAccount,
14
14
  topUpBy
15
- } from "./chunk-QMYW3D6E.js";
15
+ } from "./chunk-GSATPVTP.js";
16
+ import "./chunk-VS36INHV.js";
17
+ import "./chunk-RDTUUXZM.js";
16
18
  export {
17
19
  _resetTestnetCacheForTests,
18
20
  bootstrapPool,
package/dist/run-state.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  shouldSkipStaleWarning,
8
8
  stateFilePath,
9
9
  writeRunState
10
- } from "./chunk-O6GP6JOD.js";
10
+ } from "./chunk-RDTUUXZM.js";
11
11
  export {
12
12
  VERSION,
13
13
  loadRunState,
@@ -29,7 +29,7 @@ type DeployErrorCategory = 'user' | 'environment' | 'internal' | 'unknown';
29
29
  declare function classifyDeployError(msg: string): DeployErrorCategory;
30
30
  declare function classifySadReason(message: string): string;
31
31
  declare function computeDeployOutcome(errorCategory: DeployErrorCategory | null, isSad: boolean, sadReason: string): string;
32
- type DeployErrorKind = 'contract-revert' | 'chain-timeout' | 'nonce-stale' | 'connection' | 'naming.pop_required' | 'naming.already_owned' | 'naming.subdomain_orphan' | 'verify.contenthash_mismatch' | 'verify.dagpb_not_finalised' | 'network.recovery_exhausted' | 'chain.api_timeout' | 'tool.invariant' | 'unknown';
32
+ type DeployErrorKind = 'contract-revert' | 'chain-timeout' | 'nonce-stale' | 'connection' | 'naming.pop_required' | 'naming.already_owned' | 'naming.subdomain_orphan' | 'verify.contenthash_mismatch' | 'verify.dagpb_not_finalised' | 'network.recovery_exhausted' | 'chain.api_timeout' | 'chain.tx_timeout' | 'chain.tx_silent' | 'tool.invariant' | 'unknown';
33
33
  declare function classifyErrorKind(msg: string): DeployErrorKind;
34
34
  declare function sanitizeErrorMessage(msg: string): string;
35
35
  /**
package/dist/telemetry.js CHANGED
@@ -32,8 +32,8 @@ import {
32
32
  truncateAddress,
33
33
  withDeploySpan,
34
34
  withSpan
35
- } from "./chunk-QNRCWCBP.js";
36
- import "./chunk-O6GP6JOD.js";
35
+ } from "./chunk-VS36INHV.js";
36
+ import "./chunk-RDTUUXZM.js";
37
37
  export {
38
38
  VERSION,
39
39
  __setDeployRootSpanForTest,
@@ -11,9 +11,9 @@ import {
11
11
  isPreReleaseVersion,
12
12
  preReleaseWarning,
13
13
  promptYesNo
14
- } from "./chunk-C5ICDZ65.js";
15
- import "./chunk-QNRCWCBP.js";
16
- import "./chunk-O6GP6JOD.js";
14
+ } from "./chunk-23U57PZI.js";
15
+ import "./chunk-VS36INHV.js";
16
+ import "./chunk-RDTUUXZM.js";
17
17
  export {
18
18
  assessVersion,
19
19
  checkNodeVersion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulletin-deploy",
3
- "version": "0.7.28-rc.2",
3
+ "version": "0.7.28",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",