bulletin-deploy 0.7.11-rc.2 → 0.7.12
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/dist/bug-report.js +4 -4
- package/dist/{chunk-P7IBAWMN.js → chunk-7WKHLBZA.js} +2 -2
- package/dist/{chunk-X7VEHFJA.js → chunk-LOZ5PSD3.js} +1 -1
- package/dist/{chunk-NEVV3FCX.js → chunk-N2OZLFJA.js} +2 -2
- package/dist/{chunk-O56TCT3R.js → chunk-RVCY2VEY.js} +1 -1
- package/dist/{chunk-RP4YJYNB.js → chunk-VOEFHED3.js} +39 -44
- package/dist/{chunk-JS54GLCG.js → chunk-VQJLGE5J.js} +1 -1
- package/dist/{chunk-5CLZQA7J.js → chunk-WK2GKDMX.js} +27 -22
- package/dist/deploy.js +7 -7
- package/dist/dotns.js +4 -4
- package/dist/index.js +7 -7
- package/dist/memory-report.js +2 -2
- package/dist/pool.d.ts +3 -2
- package/dist/pool.js +1 -1
- package/dist/run-state.js +1 -1
- package/dist/telemetry.js +2 -2
- package/dist/version-check.js +3 -3
- package/package.json +1 -1
package/dist/bug-report.js
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
offerBugReport,
|
|
10
10
|
scrubSecrets,
|
|
11
11
|
setDeployContext
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-N2OZLFJA.js";
|
|
13
|
+
import "./chunk-RVCY2VEY.js";
|
|
14
|
+
import "./chunk-LOZ5PSD3.js";
|
|
15
|
+
import "./chunk-VQJLGE5J.js";
|
|
16
16
|
import "./chunk-QGM4M3NI.js";
|
|
17
17
|
export {
|
|
18
18
|
buildCliFlagsSummary,
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
captureWarning,
|
|
3
3
|
setDeployAttribute,
|
|
4
4
|
withSpan
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LOZ5PSD3.js";
|
|
6
6
|
import {
|
|
7
7
|
isTestnetSpecName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VOEFHED3.js";
|
|
9
9
|
|
|
10
10
|
// src/dotns.ts
|
|
11
11
|
import { spawn } from "child_process";
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
classifyErrorArea,
|
|
3
3
|
isInteractive,
|
|
4
4
|
promptYesNo
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RVCY2VEY.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
getCurrentSentryTraceId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LOZ5PSD3.js";
|
|
10
10
|
|
|
11
11
|
// src/bug-report.ts
|
|
12
12
|
import { execSync, execFileSync } from "child_process";
|
|
@@ -14,9 +14,8 @@ function formatPasBalance(plancks) {
|
|
|
14
14
|
var DEPLOY_PATH_PREFIX = "//deploy";
|
|
15
15
|
var TOPUP_TRANSACTIONS = 1e3;
|
|
16
16
|
var TOPUP_BYTES = 100000000n;
|
|
17
|
-
var TOPUP_THRESHOLD_TXS = 50n;
|
|
18
|
-
var TOPUP_THRESHOLD_BYTES = 50000000n;
|
|
19
17
|
var WS_HEARTBEAT_TIMEOUT_MS = 3e5;
|
|
18
|
+
var AUTHORIZATION_EXTENSION_BLOCKS = 2e6;
|
|
20
19
|
function derivePoolAccounts(poolSize = 10, mnemonic = DEV_PHRASE) {
|
|
21
20
|
const entropy = mnemonicToEntropy(mnemonic);
|
|
22
21
|
const miniSecret = entropyToMiniSecret(entropy);
|
|
@@ -34,9 +33,12 @@ function derivePoolAccounts(poolSize = 10, mnemonic = DEV_PHRASE) {
|
|
|
34
33
|
}
|
|
35
34
|
var MIN_TRANSACTIONS = 30n;
|
|
36
35
|
var MIN_BYTES = 20000000n;
|
|
37
|
-
function
|
|
36
|
+
function isAuthorizationActive(auth, currentBlock) {
|
|
37
|
+
return auth !== void 0 && Number(auth.expiration ?? 0) > currentBlock;
|
|
38
|
+
}
|
|
39
|
+
function selectAccount(authorizations, random = Math.random, currentBlock) {
|
|
38
40
|
const eligible = authorizations.filter(
|
|
39
|
-
(a) => a.transactions > MIN_TRANSACTIONS && a.bytes > MIN_BYTES
|
|
41
|
+
(a) => a.transactions > MIN_TRANSACTIONS && a.bytes > MIN_BYTES && (currentBlock === void 0 || a.expiration > currentBlock)
|
|
40
42
|
);
|
|
41
43
|
if (eligible.length === 0) return null;
|
|
42
44
|
return eligible[Math.floor(random() * eligible.length)];
|
|
@@ -50,11 +52,12 @@ async function fetchPoolAuthorizations(api, accounts) {
|
|
|
50
52
|
);
|
|
51
53
|
return {
|
|
52
54
|
...account,
|
|
53
|
-
transactions: auth ? BigInt(auth.extent.transactions) : 0n,
|
|
54
|
-
bytes: auth ? auth.extent.bytes : 0n
|
|
55
|
+
transactions: auth ? BigInt(auth.extent.transactions_allowance) - BigInt(auth.extent.transactions) : 0n,
|
|
56
|
+
bytes: auth ? BigInt(auth.extent.bytes_allowance) - BigInt(auth.extent.bytes) : 0n,
|
|
57
|
+
expiration: auth ? Number(auth.expiration) : 0
|
|
55
58
|
};
|
|
56
59
|
} catch {
|
|
57
|
-
return { ...account, transactions: 0n, bytes: 0n };
|
|
60
|
+
return { ...account, transactions: 0n, bytes: 0n, expiration: 0 };
|
|
58
61
|
}
|
|
59
62
|
})
|
|
60
63
|
);
|
|
@@ -131,61 +134,50 @@ function aliceKeyring() {
|
|
|
131
134
|
const signer = getPolkadotSigner(alice.publicKey, "Sr25519", (data) => alice.sign(data));
|
|
132
135
|
return { alice, signer };
|
|
133
136
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
async function ensureAuthorized(api, address, label, minimum = { txs: TOPUP_THRESHOLD_TXS, bytes: TOPUP_THRESHOLD_BYTES }) {
|
|
141
|
-
const auth = await api.query.TransactionStorage.Authorizations.getValue(
|
|
142
|
-
Enum("Account", address)
|
|
143
|
-
);
|
|
144
|
-
const txsRemaining = auth ? BigInt(auth.extent.transactions) : 0n;
|
|
145
|
-
const bytesRemaining = auth ? auth.extent.bytes : 0n;
|
|
146
|
-
if (txsRemaining >= minimum.txs && bytesRemaining >= minimum.bytes) {
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
137
|
+
async function ensureAuthorized(api, address, label) {
|
|
138
|
+
const [auth, currentBlock] = await Promise.all([
|
|
139
|
+
api.query.TransactionStorage.Authorizations.getValue(Enum("Account", address)),
|
|
140
|
+
api.query.System.Number.getValue()
|
|
141
|
+
]);
|
|
142
|
+
if (isAuthorizationActive(auth, currentBlock)) return;
|
|
149
143
|
console.log(` Auto-authorizing ${label ?? "account"} (${address.slice(0, 8)}...)...`);
|
|
150
144
|
const { signer } = aliceKeyring();
|
|
145
|
+
const newExpiration = currentBlock + AUTHORIZATION_EXTENSION_BLOCKS;
|
|
151
146
|
await submitAliceTxWithRetry(
|
|
152
147
|
() => api.tx.TransactionStorage.authorize_account({
|
|
153
148
|
who: address,
|
|
154
|
-
|
|
155
|
-
bytes: TOPUP_BYTES
|
|
149
|
+
expiration: newExpiration
|
|
156
150
|
}),
|
|
157
151
|
signer,
|
|
158
152
|
`authorize_account(${label ?? "account"})`
|
|
159
153
|
);
|
|
160
|
-
console.log(` Authorized: ${
|
|
154
|
+
console.log(` Authorized: expires at block ${newExpiration} (current: ${currentBlock})`);
|
|
161
155
|
}
|
|
162
156
|
async function topUpBy(api, address, needs, label) {
|
|
163
|
-
const currentAuth = await
|
|
164
|
-
Enum("Account", address)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
console.log(` Pre-auth skipped for ${label ?? "account"} (${address.slice(0, 8)}...): current ${current.transactions} txs / ${fmtMB(current.bytes)}MB covers needs + floor.`);
|
|
157
|
+
const [currentAuth, currentBlock] = await Promise.all([
|
|
158
|
+
api.query.TransactionStorage.Authorizations.getValue(Enum("Account", address)),
|
|
159
|
+
api.query.System.Number.getValue()
|
|
160
|
+
]);
|
|
161
|
+
if (isAuthorizationActive(currentAuth, currentBlock)) {
|
|
162
|
+
const fmtMB = (b) => (Number(b) / 1e6).toFixed(1);
|
|
163
|
+
const txsRemaining = BigInt(currentAuth.extent.transactions_allowance) - BigInt(currentAuth.extent.transactions);
|
|
164
|
+
const bytesRemaining = BigInt(currentAuth.extent.bytes_allowance) - BigInt(currentAuth.extent.bytes);
|
|
165
|
+
const expiration = Number(currentAuth.expiration);
|
|
166
|
+
console.log(` Pre-auth skipped for ${label ?? "account"} (${address.slice(0, 8)}...): authorized until block ${expiration}, ${txsRemaining} txs / ${fmtMB(bytesRemaining)}MB remaining.`);
|
|
174
167
|
return;
|
|
175
168
|
}
|
|
176
|
-
const
|
|
169
|
+
const newExpiration = currentBlock + AUTHORIZATION_EXTENSION_BLOCKS;
|
|
177
170
|
const { signer } = aliceKeyring();
|
|
178
|
-
console.log(` Pre-authorizing ${label ?? "account"} (${address.slice(0, 8)}...):
|
|
171
|
+
console.log(` Pre-authorizing ${label ?? "account"} (${address.slice(0, 8)}...): extending authorization to block ${newExpiration}...`);
|
|
179
172
|
await submitAliceTxWithRetry(
|
|
180
173
|
() => api.tx.TransactionStorage.authorize_account({
|
|
181
174
|
who: address,
|
|
182
|
-
|
|
183
|
-
bytes: target.bytes
|
|
175
|
+
expiration: newExpiration
|
|
184
176
|
}),
|
|
185
177
|
signer,
|
|
186
178
|
`topUpBy(${label ?? "account"})`
|
|
187
179
|
);
|
|
188
|
-
console.log(` Pre-authorized:
|
|
180
|
+
console.log(` Pre-authorized: expires at block ${newExpiration}`);
|
|
189
181
|
}
|
|
190
182
|
async function bootstrapPool(bulletinRpc, poolSize = 10, mnemonic) {
|
|
191
183
|
console.log(`Bootstrapping ${poolSize} pool accounts on ${bulletinRpc}...
|
|
@@ -203,18 +195,21 @@ async function bootstrapPool(bulletinRpc, poolSize = 10, mnemonic) {
|
|
|
203
195
|
const aliceAccount = await api.query.System.Account.getValue(alice.address);
|
|
204
196
|
const aliceBalance = BigInt(aliceAccount.data.free);
|
|
205
197
|
console.log(`Alice balance: ${formatPasBalance(aliceBalance)} PAS
|
|
198
|
+
`);
|
|
199
|
+
const currentBlock = await api.query.System.Number.getValue();
|
|
200
|
+
const authExpiration = currentBlock + AUTHORIZATION_EXTENSION_BLOCKS;
|
|
201
|
+
console.log(`Authorizing accounts until block ${authExpiration} (current: ${currentBlock})
|
|
206
202
|
`);
|
|
207
203
|
for (const account of accounts) {
|
|
208
204
|
console.log(`Account ${account.index}: ${account.address}`);
|
|
209
205
|
try {
|
|
210
206
|
const tx = api.tx.TransactionStorage.authorize_account({
|
|
211
207
|
who: account.address,
|
|
212
|
-
|
|
213
|
-
bytes: TOPUP_BYTES
|
|
208
|
+
expiration: authExpiration
|
|
214
209
|
});
|
|
215
210
|
const result = await tx.signAndSubmit(aliceSigner);
|
|
216
211
|
if (!result.ok) throw new Error("dispatch failed");
|
|
217
|
-
console.log(` Authorized:
|
|
212
|
+
console.log(` Authorized: expires at block ${authExpiration}`);
|
|
218
213
|
} catch (e) {
|
|
219
214
|
console.log(` Authorization failed: ${e.message?.slice(0, 80)}`);
|
|
220
215
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setDeployContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N2OZLFJA.js";
|
|
4
4
|
import {
|
|
5
5
|
DotNS,
|
|
6
6
|
TX_TIMEOUT_MS,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
parseDomainName,
|
|
9
9
|
popStatusName,
|
|
10
10
|
verifyNonceAdvanced
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7WKHLBZA.js";
|
|
12
12
|
import {
|
|
13
13
|
MirrorSkipped,
|
|
14
14
|
mirrorToGitHubPages,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
truncateAddress,
|
|
28
28
|
withDeploySpan,
|
|
29
29
|
withSpan
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LOZ5PSD3.js";
|
|
31
31
|
import {
|
|
32
32
|
merkleizeJS
|
|
33
33
|
} from "./chunk-B7GUYYAN.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
fetchPoolAuthorizations,
|
|
39
39
|
selectAccount,
|
|
40
40
|
topUpBy
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-VOEFHED3.js";
|
|
42
42
|
|
|
43
43
|
// src/deploy.ts
|
|
44
44
|
import { Buffer } from "buffer";
|
|
@@ -170,8 +170,11 @@ async function getProvider() {
|
|
|
170
170
|
await cryptoWaitReady();
|
|
171
171
|
const poolMnemonic = process.env.BULLETIN_POOL_MNEMONIC || void 0;
|
|
172
172
|
const poolAccounts = derivePoolAccounts(POOL_SIZE, poolMnemonic);
|
|
173
|
-
const authorizations = await
|
|
174
|
-
|
|
173
|
+
const [authorizations, currentBlockForPool] = await Promise.all([
|
|
174
|
+
fetchPoolAuthorizations(unsafeApi, poolAccounts),
|
|
175
|
+
unsafeApi.query.System.Number.getValue()
|
|
176
|
+
]);
|
|
177
|
+
let selected = selectAccount(authorizations, Math.random, currentBlockForPool);
|
|
175
178
|
if (!selected) {
|
|
176
179
|
const best = authorizations.reduce((a, b) => a.transactions > b.transactions ? a : b);
|
|
177
180
|
console.log(` All pool accounts low on capacity, auto-authorizing account ${best.index}...`);
|
|
@@ -200,16 +203,16 @@ async function getDirectProvider(mnemonic, derivationPath = "") {
|
|
|
200
203
|
const unsafeApi = client.getUnsafeApi();
|
|
201
204
|
const { signer, ss58 } = deriveRootSigner(mnemonic, derivationPath);
|
|
202
205
|
console.log(` Using direct signer: ${ss58}${derivationPath ? ` (path: ${derivationPath})` : ""}`);
|
|
203
|
-
const auth = await
|
|
204
|
-
Enum("Account", ss58)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
if (
|
|
206
|
+
const [auth, currentBlock] = await Promise.all([
|
|
207
|
+
unsafeApi.query.TransactionStorage.Authorizations.getValue(Enum("Account", ss58)),
|
|
208
|
+
client.getFinalizedBlock()
|
|
209
|
+
]);
|
|
210
|
+
const now = currentBlock.number;
|
|
211
|
+
if (!auth || Number(auth.expiration ?? 0) <= now) {
|
|
209
212
|
client.destroy();
|
|
210
213
|
throw new NonRetryableError(`Account ${ss58} is not authorized for Bulletin storage.`);
|
|
211
214
|
}
|
|
212
|
-
console.log(` Authorization:
|
|
215
|
+
console.log(` Authorization: expires at block ${Number(auth.expiration)} (current: ${now})`);
|
|
213
216
|
setDeployAttribute("deploy.signer.mode", "direct");
|
|
214
217
|
setDeployAttribute("deploy.signer.address", truncateAddress(ss58));
|
|
215
218
|
return { client, unsafeApi, signer, ss58 };
|
|
@@ -341,20 +344,22 @@ async function storeChunkedContent(chunks, { client: existingClient, unsafeApi:
|
|
|
341
344
|
}
|
|
342
345
|
const requiredTxs = BigInt(chunks.length + 1);
|
|
343
346
|
const requiredBytes = BigInt(totalBytes);
|
|
344
|
-
const
|
|
345
|
-
Enum("Account", ss58)
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
|
|
347
|
+
const [uploadAuth, currentBlockNum] = await Promise.all([
|
|
348
|
+
unsafeApi.query.TransactionStorage.Authorizations.getValue(Enum("Account", ss58)),
|
|
349
|
+
unsafeApi.query.System.Number.getValue()
|
|
350
|
+
]);
|
|
351
|
+
const txsRemaining = uploadAuth ? BigInt(uploadAuth.extent.transactions_allowance) - BigInt(uploadAuth.extent.transactions) : 0n;
|
|
352
|
+
const bytesRemaining = uploadAuth ? BigInt(uploadAuth.extent.bytes_allowance) - BigInt(uploadAuth.extent.bytes) : 0n;
|
|
353
|
+
const isAuthorized = uploadAuth !== void 0 && Number(uploadAuth.expiration ?? 0) > currentBlockNum;
|
|
354
|
+
if (!isAuthorized || txsRemaining < requiredTxs || bytesRemaining < requiredBytes) {
|
|
350
355
|
console.log(`
|
|
351
|
-
Account
|
|
356
|
+
Account needs re-authorization (authorized=${isAuthorized}, need ${requiredTxs} txs / ${(totalBytes / 1e6).toFixed(1)}MB, have ${txsRemaining} txs / ${Number(bytesRemaining) / 1e6}MB)`);
|
|
352
357
|
console.log(` Attempting to re-authorize with Alice...`);
|
|
353
358
|
try {
|
|
354
|
-
await ensureAuthorized(unsafeApi, ss58
|
|
359
|
+
await ensureAuthorized(unsafeApi, ss58);
|
|
355
360
|
console.log(` Re-authorization successful`);
|
|
356
361
|
} catch (e) {
|
|
357
|
-
throw new NonRetryableError(`Account ${ss58} has insufficient Bulletin authorization
|
|
362
|
+
throw new NonRetryableError(`Account ${ss58} has insufficient Bulletin authorization and auto-authorization via Alice failed (${e.message}). Authorize the account on-chain.`);
|
|
358
363
|
}
|
|
359
364
|
}
|
|
360
365
|
let reconnectionsUsed = 0;
|
package/dist/deploy.js
CHANGED
|
@@ -26,15 +26,15 @@ import {
|
|
|
26
26
|
storeChunkedContent,
|
|
27
27
|
storeDirectory,
|
|
28
28
|
storeFile
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-WK2GKDMX.js";
|
|
30
|
+
import "./chunk-N2OZLFJA.js";
|
|
31
|
+
import "./chunk-RVCY2VEY.js";
|
|
32
|
+
import "./chunk-7WKHLBZA.js";
|
|
33
33
|
import "./chunk-HOTQDYHD.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-LOZ5PSD3.js";
|
|
35
|
+
import "./chunk-VQJLGE5J.js";
|
|
36
36
|
import "./chunk-B7GUYYAN.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-VOEFHED3.js";
|
|
38
38
|
import "./chunk-QGM4M3NI.js";
|
|
39
39
|
export {
|
|
40
40
|
CHUNK_MORTALITY_PERIOD,
|
package/dist/dotns.js
CHANGED
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
stripTrailingDigits,
|
|
36
36
|
validateDomainLabel,
|
|
37
37
|
verifyNonceAdvanced
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-7WKHLBZA.js";
|
|
39
|
+
import "./chunk-LOZ5PSD3.js";
|
|
40
|
+
import "./chunk-VQJLGE5J.js";
|
|
41
|
+
import "./chunk-VOEFHED3.js";
|
|
42
42
|
import "./chunk-QGM4M3NI.js";
|
|
43
43
|
export {
|
|
44
44
|
CONNECTION_TIMEOUT_MS,
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deploy
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-WK2GKDMX.js";
|
|
4
|
+
import "./chunk-N2OZLFJA.js";
|
|
5
|
+
import "./chunk-RVCY2VEY.js";
|
|
6
6
|
import {
|
|
7
7
|
DotNS,
|
|
8
8
|
parseDomainName
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7WKHLBZA.js";
|
|
10
10
|
import "./chunk-HOTQDYHD.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-LOZ5PSD3.js";
|
|
12
12
|
import {
|
|
13
13
|
VERSION,
|
|
14
14
|
loadRunState,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
shouldSkipStaleWarning,
|
|
19
19
|
stateFilePath,
|
|
20
20
|
writeRunState
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VQJLGE5J.js";
|
|
22
22
|
import {
|
|
23
23
|
merkleizeJS
|
|
24
24
|
} from "./chunk-B7GUYYAN.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
ensureAuthorized,
|
|
29
29
|
fetchPoolAuthorizations,
|
|
30
30
|
selectAccount
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-VOEFHED3.js";
|
|
32
32
|
import "./chunk-QGM4M3NI.js";
|
|
33
33
|
export {
|
|
34
34
|
DotNS,
|
package/dist/memory-report.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
maybeWriteMemoryReport,
|
|
6
6
|
safeHeap,
|
|
7
7
|
sampleFromBytes
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-LOZ5PSD3.js";
|
|
9
|
+
import "./chunk-VQJLGE5J.js";
|
|
10
10
|
import "./chunk-QGM4M3NI.js";
|
|
11
11
|
export {
|
|
12
12
|
DEFAULT_THRESHOLD_MB,
|
package/dist/pool.d.ts
CHANGED
|
@@ -11,9 +11,10 @@ interface PoolAccount {
|
|
|
11
11
|
interface PoolAuthorization extends PoolAccount {
|
|
12
12
|
transactions: bigint;
|
|
13
13
|
bytes: bigint;
|
|
14
|
+
expiration: number;
|
|
14
15
|
}
|
|
15
16
|
declare function derivePoolAccounts(poolSize?: number, mnemonic?: string): PoolAccount[];
|
|
16
|
-
declare function selectAccount(authorizations: PoolAuthorization[], random?: () => number): PoolAuthorization | null;
|
|
17
|
+
declare function selectAccount(authorizations: PoolAuthorization[], random?: () => number, currentBlock?: number): PoolAuthorization | null;
|
|
17
18
|
declare function fetchPoolAuthorizations(api: any, accounts: PoolAccount[]): Promise<PoolAuthorization[]>;
|
|
18
19
|
interface AuthorizationNeeds {
|
|
19
20
|
txs: bigint;
|
|
@@ -31,7 +32,7 @@ declare function classifyAliceTxError(err: unknown): TxRetryDecision;
|
|
|
31
32
|
declare function isTestnetSpecName(specName: string | undefined | null): boolean;
|
|
32
33
|
declare function detectTestnet(api: any): Promise<boolean>;
|
|
33
34
|
declare function _resetTestnetCacheForTests(): void;
|
|
34
|
-
declare function ensureAuthorized(api: any, address: string, label?: string
|
|
35
|
+
declare function ensureAuthorized(api: any, address: string, label?: string): Promise<void>;
|
|
35
36
|
declare function topUpBy(api: any, address: string, needs: AuthorizationNeeds, label?: string): Promise<void>;
|
|
36
37
|
declare function bootstrapPool(bulletinRpc: string, poolSize?: number, mnemonic?: string): Promise<void>;
|
|
37
38
|
|
package/dist/pool.js
CHANGED
package/dist/run-state.js
CHANGED
package/dist/telemetry.js
CHANGED
package/dist/version-check.js
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
isPreReleaseVersion,
|
|
9
9
|
preReleaseWarning,
|
|
10
10
|
promptYesNo
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-RVCY2VEY.js";
|
|
12
|
+
import "./chunk-LOZ5PSD3.js";
|
|
13
|
+
import "./chunk-VQJLGE5J.js";
|
|
14
14
|
import "./chunk-QGM4M3NI.js";
|
|
15
15
|
export {
|
|
16
16
|
assessVersion,
|