bulletin-deploy 0.7.29 → 0.7.30-rc.0
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/assets/environments.json +5 -2
- package/dist/bug-report.js +4 -4
- package/dist/{chunk-2VAUMZB2.js → chunk-7Y7RDOGT.js} +39 -8
- package/dist/{chunk-BMAEWZYV.js → chunk-AFBOKCCQ.js} +3 -3
- package/dist/{chunk-2MGQ5QS4.js → chunk-C2OHYVVV.js} +3 -3
- package/dist/{chunk-YEWIFZ7J.js → chunk-ELR4BB37.js} +1 -1
- package/dist/{chunk-JZFXFZ5L.js → chunk-GL2HHK4G.js} +5 -2
- package/dist/{chunk-SHQQAV3M.js → chunk-IAZPLMVV.js} +58 -7
- package/dist/{chunk-5VZQ2KSU.js → chunk-JCOZV25R.js} +18 -15
- package/dist/{chunk-IDYGYIMH.js → chunk-LHLCPDGL.js} +1 -1
- package/dist/{chunk-HBCFVJFN.js → chunk-LM64HBVK.js} +5 -1
- package/dist/{chunk-37OMZNAP.js → chunk-M45PUARJ.js} +3 -3
- package/dist/{chunk-MR4P6GVK.js → chunk-MKB5W6TK.js} +1 -1
- package/dist/{chunk-HWCO6SA6.js → chunk-O232DOVQ.js} +43 -60
- package/dist/{chunk-T7EEVWNU.js → chunk-SI2ZUOYD.js} +5 -5
- package/dist/chunk-SLE4P6MO.js +39 -0
- package/dist/{chunk-QUQCVGTX.js → chunk-UZHRNGAC.js} +2 -2
- package/dist/chunk-XAB7WM3S.js +90 -0
- package/dist/{chunk-HTC3AV4I.js → chunk-ZUOLBIZS.js} +1 -1
- package/dist/chunk-probe.js +3 -3
- package/dist/deploy.d.ts +3 -1
- package/dist/deploy.js +11 -9
- package/dist/dotns.d.ts +19 -2
- package/dist/dotns.js +7 -5
- package/dist/environments.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -10
- package/dist/manifest/publish.js +10 -10
- package/dist/memory-report.js +2 -2
- package/dist/merkle.js +9 -9
- package/dist/personhood/bind-paid-alias.d.ts +1 -1
- package/dist/personhood/bind-paid-alias.js +3 -2
- package/dist/personhood/bind-personal-id.js +2 -2
- package/dist/personhood/bootstrap.d.ts +7 -0
- package/dist/personhood/bootstrap.js +29 -17
- package/dist/personhood/chain-prereqs.d.ts +76 -0
- package/dist/personhood/chain-prereqs.js +17 -0
- package/dist/personhood/claim-pgas.d.ts +33 -2
- package/dist/personhood/claim-pgas.js +4 -2
- package/dist/personhood/constants.d.ts +5 -5
- package/dist/personhood/constants.js +3 -3
- package/dist/personhood/member-key.js +2 -2
- package/dist/personhood/people-client.js +5 -5
- package/dist/personhood/proof-validity.d.ts +41 -0
- package/dist/personhood/proof-validity.js +12 -0
- package/dist/personhood/reprove.d.ts +1 -1
- package/dist/personhood/reprove.js +10 -13
- package/dist/pool.js +3 -3
- package/dist/run-state.js +1 -1
- package/dist/telemetry.d.ts +43 -1
- package/dist/telemetry.js +4 -2
- package/dist/version-check.js +3 -3
- package/package.json +3 -3
package/assets/environments.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"name": "Preview",
|
|
6
6
|
"network": "testnet",
|
|
7
7
|
"description": "Product Preview net, used by Product Teams",
|
|
8
|
+
"e2eEligible": true,
|
|
8
9
|
"backend": "https://polkadot-app-stg.parity.io/",
|
|
9
10
|
"ipfs": "https://previewnet.substrate.dev",
|
|
10
11
|
"autoAccountMapping": true,
|
|
@@ -24,7 +25,8 @@
|
|
|
24
25
|
"POP_RULES": "0xF209a15e8a10D208bb4d3e3c56D9EB73a5934C26",
|
|
25
26
|
"STORE_FACTORY": "0x4BEFaB5de968183524b1eBd2FAec9C68Cdc696Fd",
|
|
26
27
|
"LABEL_STORE_BEACON": "0x11f324597d850d626d6406713808Ed854dA00a6b",
|
|
27
|
-
"USER_STORE_BEACON": "0xaC2209aFc366505d10Fd27d27030EB8C5E54874e"
|
|
28
|
+
"USER_STORE_BEACON": "0xaC2209aFc366505d10Fd27d27030EB8C5E54874e",
|
|
29
|
+
"PUBLISHER": "0xa616254fd98724c7a3d295c98ca393a486096b68"
|
|
28
30
|
}
|
|
29
31
|
},
|
|
30
32
|
{
|
|
@@ -51,6 +53,7 @@
|
|
|
51
53
|
"name": "Paseo Next v2",
|
|
52
54
|
"network": "testnet",
|
|
53
55
|
"description": "Next iteration of the Paseo Next testnet",
|
|
56
|
+
"e2eEligible": true,
|
|
54
57
|
"backend": "https://identity-backend-next.parity-testnet.parity.io",
|
|
55
58
|
"ipfs": "https://paseo-bulletin-next-ipfs.polkadot.io",
|
|
56
59
|
"docsUrl": "https://sre.teleport.parity.io/environments/paseo-next/",
|
|
@@ -80,7 +83,7 @@
|
|
|
80
83
|
"STORE_FACTORY": "0x692047C1477a017F287488E1c85F96Ca28C23fD8",
|
|
81
84
|
"LABEL_STORE_BEACON": "0x86ff9CE56C86bC3DfcaA7E316FB0Dd816e9fA2df",
|
|
82
85
|
"USER_STORE_BEACON": "0x6a7a938f72D39f949ee484a78c4C500514E2cb69",
|
|
83
|
-
"PUBLISHER": "
|
|
86
|
+
"PUBLISHER": "0xa616254fd98724c7a3d295c98ca393a486096b68"
|
|
84
87
|
}
|
|
85
88
|
},
|
|
86
89
|
{
|
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-UZHRNGAC.js";
|
|
13
|
+
import "./chunk-ELR4BB37.js";
|
|
14
|
+
import "./chunk-LM64HBVK.js";
|
|
15
|
+
import "./chunk-M45PUARJ.js";
|
|
16
16
|
export {
|
|
17
17
|
buildCliFlagsSummary,
|
|
18
18
|
buildLabels,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
PEOPLE_MEMBER_IDENTIFIER_HEX,
|
|
3
3
|
PGAS_ASSET_ID,
|
|
4
4
|
PROOF_BYTES
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SI2ZUOYD.js";
|
|
6
6
|
import {
|
|
7
7
|
buildImplicationMessage,
|
|
8
8
|
buildV5GeneralExtrinsic,
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-ZYVGHDMU.js";
|
|
15
15
|
|
|
16
16
|
// src/personhood/claim-pgas.ts
|
|
17
|
+
import * as verifiable from "verifiablejs/nodejs";
|
|
17
18
|
import { Enum } from "polkadot-api";
|
|
18
19
|
var PgasClaimError = class extends Error {
|
|
19
20
|
kind;
|
|
@@ -26,11 +27,6 @@ var PgasClaimError = class extends Error {
|
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
29
|
var SECS_PER_DAY = 86400n;
|
|
29
|
-
var IMPLICATION_EXCLUDE = /* @__PURE__ */ new Set([
|
|
30
|
-
"AuthorizeCall",
|
|
31
|
-
"AsPgas",
|
|
32
|
-
"StorageWeightReclaim"
|
|
33
|
-
]);
|
|
34
30
|
var PGAS_CONTEXT_PREFIX = new TextEncoder().encode("pop:gas:");
|
|
35
31
|
function buildGasContext(day, slotIndex) {
|
|
36
32
|
const out = new Uint8Array(32);
|
|
@@ -40,6 +36,20 @@ function buildGasContext(day, slotIndex) {
|
|
|
40
36
|
dv.setUint32(12, slotIndex, true);
|
|
41
37
|
return out;
|
|
42
38
|
}
|
|
39
|
+
function buildImplicationExclude(pipelineOrder) {
|
|
40
|
+
const asPgasIdx = pipelineOrder.indexOf("AsPgas");
|
|
41
|
+
if (asPgasIdx < 0) {
|
|
42
|
+
throw new Error("AsPgas not in AH pipeline \u2014 wrong chain?");
|
|
43
|
+
}
|
|
44
|
+
return /* @__PURE__ */ new Set([
|
|
45
|
+
...pipelineOrder.slice(0, asPgasIdx + 1),
|
|
46
|
+
// everything ≤ AsPgas
|
|
47
|
+
"AuthorizeCall",
|
|
48
|
+
// empty value+implicit, no-op
|
|
49
|
+
"StorageWeightReclaim"
|
|
50
|
+
// outer wrapper, no contribution
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
43
53
|
function buildAsPgasClaimExtensionValue(proof, ringIndex, revision, day) {
|
|
44
54
|
return Enum("Claim", {
|
|
45
55
|
proof: bytesToHex(proof),
|
|
@@ -57,7 +67,8 @@ var claimPgas = async ({
|
|
|
57
67
|
memberKey,
|
|
58
68
|
buildRingProof,
|
|
59
69
|
slotIndex = 0,
|
|
60
|
-
progress
|
|
70
|
+
progress,
|
|
71
|
+
validateWithCommitment = defaultValidateWithCommitment
|
|
61
72
|
}) => {
|
|
62
73
|
const people = peopleUnsafeApi;
|
|
63
74
|
const ah = ahUnsafeApi;
|
|
@@ -128,10 +139,11 @@ var claimPgas = async ({
|
|
|
128
139
|
const innerTx = ah.tx.Pgas.claim_pgas({ slot_index: slotIndex, target });
|
|
129
140
|
const callBytes = await innerTx.getEncodedData();
|
|
130
141
|
const passEmpty = await capturePass(innerTx, void 0);
|
|
142
|
+
const implicationExclude = buildImplicationExclude(passEmpty.extensions.order);
|
|
131
143
|
const msg = buildImplicationMessage(
|
|
132
144
|
callBytes,
|
|
133
145
|
passEmpty.extensions,
|
|
134
|
-
|
|
146
|
+
implicationExclude
|
|
135
147
|
);
|
|
136
148
|
const { proof, alias } = await buildRingProof({
|
|
137
149
|
ringExponent,
|
|
@@ -145,6 +157,15 @@ var claimPgas = async ({
|
|
|
145
157
|
{ kind: "ClientError" }
|
|
146
158
|
);
|
|
147
159
|
}
|
|
160
|
+
const rootBytes = latest.root instanceof Uint8Array ? latest.root : latest.root.asBytes();
|
|
161
|
+
try {
|
|
162
|
+
validateWithCommitment(ringExponent, proof, rootBytes, contextBytes, msg);
|
|
163
|
+
} catch (err) {
|
|
164
|
+
throw new PgasClaimError(
|
|
165
|
+
`validate_with_commitment failed locally \u2014 proof will be rejected by chain. proof=${proof.length}B context=${contextBytes.length}B commitment=${rootBytes.length}B. Cause: ${err instanceof Error ? err.message : String(err)}`,
|
|
166
|
+
{ kind: "BadProof", cause: err }
|
|
167
|
+
);
|
|
168
|
+
}
|
|
148
169
|
const asPgasValue = Enum("Claim", {
|
|
149
170
|
proof: bytesToHex(proof),
|
|
150
171
|
ring_index: ringIndex,
|
|
@@ -159,6 +180,15 @@ var claimPgas = async ({
|
|
|
159
180
|
const amount = await ah.constants.Pgas.PgasClaimAmount();
|
|
160
181
|
return { blockHash, amount, alias };
|
|
161
182
|
};
|
|
183
|
+
var defaultValidateWithCommitment = (ringExponent, proof, commitment, context, message) => {
|
|
184
|
+
const fn = verifiable["validate_with_commitment"];
|
|
185
|
+
if (typeof fn !== "function") {
|
|
186
|
+
throw new Error(
|
|
187
|
+
"validate_with_commitment is not exported by the installed verifiablejs. Upgrade to verifiablejs@1.3.0-beta.4 or newer to enable local proof pre-flight. See docs-internal/dotns-bootstrap-handover.md \xA75."
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
return fn(ringExponent, proof, commitment, context, message);
|
|
191
|
+
};
|
|
162
192
|
var capturePass = async (innerTx, asPgasValue) => {
|
|
163
193
|
let captured = null;
|
|
164
194
|
const sentinel = new Error("__pgas_capture_sentinel__");
|
|
@@ -279,6 +309,7 @@ var submitExtrinsic = (client, extrinsicHex, progress) => {
|
|
|
279
309
|
|
|
280
310
|
export {
|
|
281
311
|
PgasClaimError,
|
|
312
|
+
buildImplicationExclude,
|
|
282
313
|
buildAsPgasClaimExtensionValue,
|
|
283
314
|
claimPgas
|
|
284
315
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MEMBER_ENTROPY_KEY
|
|
3
|
-
} from "./chunk-T7EEVWNU.js";
|
|
4
1
|
import {
|
|
5
2
|
blake2b256Keyed
|
|
6
3
|
} from "./chunk-UPWEOGLQ.js";
|
|
4
|
+
import {
|
|
5
|
+
MEMBER_ENTROPY_KEY
|
|
6
|
+
} from "./chunk-SI2ZUOYD.js";
|
|
7
7
|
|
|
8
8
|
// src/personhood/member-key.ts
|
|
9
9
|
import { mnemonicToEntropy } from "@polkadot-labs/hdkd-helpers";
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
resolveDotnsConnectOptions,
|
|
7
7
|
storeDirectory,
|
|
8
8
|
storeFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IAZPLMVV.js";
|
|
10
10
|
import {
|
|
11
11
|
DotNS
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O232DOVQ.js";
|
|
13
13
|
import {
|
|
14
14
|
getPopSelfServeConfig,
|
|
15
15
|
loadEnvironments,
|
|
16
16
|
resolveEndpoints
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GL2HHK4G.js";
|
|
18
18
|
import {
|
|
19
19
|
NonRetryableError
|
|
20
20
|
} from "./chunk-ZOC4GITL.js";
|
|
@@ -14,6 +14,7 @@ var environments_default = {
|
|
|
14
14
|
name: "Preview",
|
|
15
15
|
network: "testnet",
|
|
16
16
|
description: "Product Preview net, used by Product Teams",
|
|
17
|
+
e2eEligible: true,
|
|
17
18
|
backend: "https://polkadot-app-stg.parity.io/",
|
|
18
19
|
ipfs: "https://previewnet.substrate.dev",
|
|
19
20
|
autoAccountMapping: true,
|
|
@@ -33,7 +34,8 @@ var environments_default = {
|
|
|
33
34
|
POP_RULES: "0xF209a15e8a10D208bb4d3e3c56D9EB73a5934C26",
|
|
34
35
|
STORE_FACTORY: "0x4BEFaB5de968183524b1eBd2FAec9C68Cdc696Fd",
|
|
35
36
|
LABEL_STORE_BEACON: "0x11f324597d850d626d6406713808Ed854dA00a6b",
|
|
36
|
-
USER_STORE_BEACON: "0xaC2209aFc366505d10Fd27d27030EB8C5E54874e"
|
|
37
|
+
USER_STORE_BEACON: "0xaC2209aFc366505d10Fd27d27030EB8C5E54874e",
|
|
38
|
+
PUBLISHER: "0xa616254fd98724c7a3d295c98ca393a486096b68"
|
|
37
39
|
}
|
|
38
40
|
},
|
|
39
41
|
{
|
|
@@ -60,6 +62,7 @@ var environments_default = {
|
|
|
60
62
|
name: "Paseo Next v2",
|
|
61
63
|
network: "testnet",
|
|
62
64
|
description: "Next iteration of the Paseo Next testnet",
|
|
65
|
+
e2eEligible: true,
|
|
63
66
|
backend: "https://identity-backend-next.parity-testnet.parity.io",
|
|
64
67
|
ipfs: "https://paseo-bulletin-next-ipfs.polkadot.io",
|
|
65
68
|
docsUrl: "https://sre.teleport.parity.io/environments/paseo-next/",
|
|
@@ -89,7 +92,7 @@ var environments_default = {
|
|
|
89
92
|
STORE_FACTORY: "0x692047C1477a017F287488E1c85F96Ca28C23fD8",
|
|
90
93
|
LABEL_STORE_BEACON: "0x86ff9CE56C86bC3DfcaA7E316FB0Dd816e9fA2df",
|
|
91
94
|
USER_STORE_BEACON: "0x6a7a938f72D39f949ee484a78c4C500514E2cb69",
|
|
92
|
-
PUBLISHER: "
|
|
95
|
+
PUBLISHER: "0xa616254fd98724c7a3d295c98ca393a486096b68"
|
|
93
96
|
}
|
|
94
97
|
},
|
|
95
98
|
{
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
} from "./chunk-S7EM5VMW.js";
|
|
21
21
|
import {
|
|
22
22
|
setDeployContext
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UZHRNGAC.js";
|
|
24
24
|
import {
|
|
25
25
|
probeChunks
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MKB5W6TK.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-
|
|
38
|
+
} from "./chunk-O232DOVQ.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-
|
|
46
|
+
} from "./chunk-ZUOLBIZS.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-
|
|
60
|
+
} from "./chunk-LM64HBVK.js";
|
|
61
61
|
import {
|
|
62
62
|
DEFAULT_ENV_ID,
|
|
63
63
|
getPopSelfServeConfig,
|
|
64
64
|
loadEnvironments,
|
|
65
65
|
resolveEndpoints
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-GL2HHK4G.js";
|
|
67
67
|
import {
|
|
68
68
|
NonRetryableError
|
|
69
69
|
} from "./chunk-ZOC4GITL.js";
|
|
@@ -281,6 +281,53 @@ async function getDirectProvider(mnemonic, derivationPath = "") {
|
|
|
281
281
|
setDeployAttribute("deploy.signer.address", truncateAddress(ss58));
|
|
282
282
|
return { client, unsafeApi, signer, ss58 };
|
|
283
283
|
}
|
|
284
|
+
async function getSignerProvider(signer, ss58) {
|
|
285
|
+
const primary = BULLETIN_ENDPOINTS[0];
|
|
286
|
+
console.log(` Connecting to Bulletin: ${primary}`);
|
|
287
|
+
const client = createPolkadotClient(getWsProvider(
|
|
288
|
+
BULLETIN_ENDPOINTS,
|
|
289
|
+
{ heartbeatTimeout: WS_HEARTBEAT_TIMEOUT_MS, onStatusChanged: makeBulletinStatusHandler(primary) }
|
|
290
|
+
));
|
|
291
|
+
const unsafeApi = client.getUnsafeApi();
|
|
292
|
+
console.log(` Using external signer: ${ss58}`);
|
|
293
|
+
let [auth, currentBlock] = await Promise.all([
|
|
294
|
+
unsafeApi.query.TransactionStorage.Authorizations.getValue(Enum("Account", ss58)),
|
|
295
|
+
client.getFinalizedBlock()
|
|
296
|
+
]);
|
|
297
|
+
let now = currentBlock.number;
|
|
298
|
+
if (!auth || Number(auth.expiration ?? 0) <= now) {
|
|
299
|
+
try {
|
|
300
|
+
await ensureAuthorized(unsafeApi, ss58, "external signer");
|
|
301
|
+
[auth, currentBlock] = await Promise.all([
|
|
302
|
+
unsafeApi.query.TransactionStorage.Authorizations.getValue(Enum("Account", ss58)),
|
|
303
|
+
client.getFinalizedBlock()
|
|
304
|
+
]);
|
|
305
|
+
now = currentBlock.number;
|
|
306
|
+
} catch (e) {
|
|
307
|
+
client.destroy();
|
|
308
|
+
throw new NonRetryableError(`Account ${ss58} is not authorized for Bulletin storage and auto-authorization failed: ${e.message}`);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
console.log(` Authorization: expires at block ${Number(auth?.expiration ?? 0)} (current: ${now})`);
|
|
312
|
+
setDeployAttribute("deploy.signer.mode", "external");
|
|
313
|
+
setDeployAttribute("deploy.signer.address", truncateAddress(ss58));
|
|
314
|
+
return { client, unsafeApi, signer, ss58 };
|
|
315
|
+
}
|
|
316
|
+
function __selectStorageProviderModeForTest(options) {
|
|
317
|
+
if (options.signer && options.signerAddress) return "signer";
|
|
318
|
+
if (options.mnemonic) return "direct";
|
|
319
|
+
return "pool";
|
|
320
|
+
}
|
|
321
|
+
function selectStorageReconnect(options) {
|
|
322
|
+
switch (__selectStorageProviderModeForTest(options)) {
|
|
323
|
+
case "signer":
|
|
324
|
+
return () => getSignerProvider(options.signer, options.signerAddress);
|
|
325
|
+
case "direct":
|
|
326
|
+
return () => getDirectProvider(options.mnemonic, options.derivationPath);
|
|
327
|
+
case "pool":
|
|
328
|
+
return () => getProvider();
|
|
329
|
+
}
|
|
330
|
+
}
|
|
284
331
|
function watchTransaction(tx, signer, txOpts, onSuccess, { label = "transaction", rpc, senderSS58, expectedNonce, timeoutMs, fetchNonce: fetchNonceOverride } = {}) {
|
|
285
332
|
const timeout = timeoutMs ?? TX_TIMEOUT_MS;
|
|
286
333
|
const _fetchNonce = fetchNonceOverride ?? fetchNonce;
|
|
@@ -1531,6 +1578,9 @@ async function unpublish(domainName, options = {}) {
|
|
|
1531
1578
|
}
|
|
1532
1579
|
}
|
|
1533
1580
|
async function deploy(content, domainName = null, options = {}) {
|
|
1581
|
+
if (options.signer && options.signerAddress && options.mnemonic) {
|
|
1582
|
+
throw new NonRetryableError("Pass either a mnemonic or an external signer, not both \u2014 they identify the signing account and only one can win.");
|
|
1583
|
+
}
|
|
1534
1584
|
const envId = options.env ?? DEFAULT_ENV_ID;
|
|
1535
1585
|
let envBulletin = [DEFAULT_BULLETIN_RPC];
|
|
1536
1586
|
let envAssetHub;
|
|
@@ -1600,7 +1650,7 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
1600
1650
|
if (process.env.CI) console.log(` Runner: ${resolveRunner()} (${resolveRunnerType()})`);
|
|
1601
1651
|
if (options.password) console.log(` Encrypted: yes`);
|
|
1602
1652
|
let provider;
|
|
1603
|
-
const reconnect =
|
|
1653
|
+
const reconnect = selectStorageReconnect(options);
|
|
1604
1654
|
let dotnsPreflight = null;
|
|
1605
1655
|
let previousContenthashCid = null;
|
|
1606
1656
|
try {
|
|
@@ -2335,6 +2385,7 @@ export {
|
|
|
2335
2385
|
ENCRYPT_KEY_LEN,
|
|
2336
2386
|
ENCRYPT_PBKDF2_ITERATIONS,
|
|
2337
2387
|
encryptContent,
|
|
2388
|
+
__selectStorageProviderModeForTest,
|
|
2338
2389
|
storeFile,
|
|
2339
2390
|
__assignDenseNoncesForTest,
|
|
2340
2391
|
storeChunkedContent,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
buildAliasProofMessage,
|
|
3
|
+
getProofValidAtSec
|
|
4
|
+
} from "./chunk-SLE4P6MO.js";
|
|
5
|
+
import {
|
|
3
6
|
PEOPLE_MEMBER_IDENTIFIER_HEX,
|
|
4
7
|
PGAS_ASSET_ID,
|
|
5
8
|
PGAS_ASSET_LOCATION,
|
|
6
9
|
PROOF_BYTES
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SI2ZUOYD.js";
|
|
8
11
|
import {
|
|
9
|
-
blake2_256,
|
|
10
12
|
bytesToHex,
|
|
11
|
-
concatBytes,
|
|
12
13
|
encodeMembers,
|
|
13
14
|
hexToBytes
|
|
14
15
|
} from "./chunk-ZYVGHDMU.js";
|
|
@@ -47,11 +48,11 @@ var bindPaidAliasToAccount = async ({
|
|
|
47
48
|
kind: "ClientError"
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
|
-
const fee = await ah.query.AliasAccounts.
|
|
51
|
+
const fee = await ah.query.AliasAccounts.AliasFee.getValue({ at: "best" });
|
|
51
52
|
if (fee === void 0) {
|
|
52
53
|
throw new PaidAliasBindingError(
|
|
53
|
-
"AliasAccounts.
|
|
54
|
-
{ kind: "
|
|
54
|
+
"AliasAccounts.AliasFee is unset \u2014 needs sudo `set_alias_fee`",
|
|
55
|
+
{ kind: "AliasFeeUnset" }
|
|
55
56
|
);
|
|
56
57
|
}
|
|
57
58
|
const pgas = await ah.query.Assets.Account.getValue(
|
|
@@ -112,18 +113,19 @@ var bindPaidAliasToAccount = async ({
|
|
|
112
113
|
}
|
|
113
114
|
const latest = ringRoots[ringRoots.length - 1];
|
|
114
115
|
const revision = latest.revision;
|
|
116
|
+
const proofValidAt = await getProofValidAtSec(ah);
|
|
115
117
|
const ss58Info = getSs58AddressInfo(account);
|
|
116
118
|
if (!ss58Info.isValid) {
|
|
117
119
|
throw new PaidAliasBindingError(`invalid SS58: ${account}`, {
|
|
118
120
|
kind: "ClientError"
|
|
119
121
|
});
|
|
120
122
|
}
|
|
121
|
-
const
|
|
123
|
+
const aliasMsg = buildAliasProofMessage(ss58Info.publicKey, proofValidAt);
|
|
122
124
|
const { proof, alias } = await buildRingProof({
|
|
123
125
|
ringExponent,
|
|
124
126
|
members: membersBytes,
|
|
125
127
|
context: contextBytes,
|
|
126
|
-
msg:
|
|
128
|
+
msg: aliasMsg
|
|
127
129
|
});
|
|
128
130
|
if (proof.length !== PROOF_BYTES) {
|
|
129
131
|
throw new PaidAliasBindingError(
|
|
@@ -131,12 +133,13 @@ var bindPaidAliasToAccount = async ({
|
|
|
131
133
|
{ kind: "ClientError" }
|
|
132
134
|
);
|
|
133
135
|
}
|
|
134
|
-
const tx = ah.tx.AliasAccounts.
|
|
136
|
+
const tx = ah.tx.AliasAccounts.set_alias_account({
|
|
135
137
|
proof: bytesToHex(proof),
|
|
136
138
|
collection: collectionId,
|
|
137
139
|
ring_index: ringIndex,
|
|
138
140
|
ring_revision: revision,
|
|
139
|
-
context: bytesToHex(contextBytes)
|
|
141
|
+
context: bytesToHex(contextBytes),
|
|
142
|
+
proof_valid_at: proofValidAt
|
|
140
143
|
});
|
|
141
144
|
const submitOptions = {
|
|
142
145
|
customSignedExtensions: {
|
|
@@ -169,7 +172,7 @@ var bindPaidAliasToAccount = async ({
|
|
|
169
172
|
if (ev.ok === false) {
|
|
170
173
|
fail(
|
|
171
174
|
new PaidAliasBindingError(
|
|
172
|
-
"
|
|
175
|
+
"set_alias_account dispatched but failed in-block",
|
|
173
176
|
{
|
|
174
177
|
kind: narrowDispatchError(ev.dispatchError),
|
|
175
178
|
dispatchError: ev.dispatchError
|
|
@@ -185,7 +188,7 @@ var bindPaidAliasToAccount = async ({
|
|
|
185
188
|
if (ev.ok === false) {
|
|
186
189
|
fail(
|
|
187
190
|
new PaidAliasBindingError(
|
|
188
|
-
"
|
|
191
|
+
"set_alias_account failed at finalization",
|
|
189
192
|
{
|
|
190
193
|
kind: narrowDispatchError(ev.dispatchError),
|
|
191
194
|
dispatchError: ev.dispatchError
|
|
@@ -217,8 +220,8 @@ var narrowDispatchError = (dispatchError) => {
|
|
|
217
220
|
if (v.type === "AliasAccounts" && v.value?.type === "BadProof") {
|
|
218
221
|
return "BadProof";
|
|
219
222
|
}
|
|
220
|
-
if (v.type === "AliasAccounts" && v.value?.type === "
|
|
221
|
-
return "
|
|
223
|
+
if (v.type === "AliasAccounts" && v.value?.type === "AliasFeeUnset") {
|
|
224
|
+
return "AliasFeeUnset";
|
|
222
225
|
}
|
|
223
226
|
}
|
|
224
227
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default,
|
|
3
3
|
writeRunState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-M45PUARJ.js";
|
|
5
5
|
|
|
6
6
|
// src/memory-report.ts
|
|
7
7
|
import * as fs2 from "fs";
|
|
@@ -550,6 +550,9 @@ function setDeploySentryTag(key, value) {
|
|
|
550
550
|
if (!Sentry) return;
|
|
551
551
|
Sentry.setTag(key, value);
|
|
552
552
|
}
|
|
553
|
+
function markCodePath(id) {
|
|
554
|
+
setDeployAttribute(`code.path.${id}`, "true");
|
|
555
|
+
}
|
|
553
556
|
function captureWarning(message, context) {
|
|
554
557
|
if (!Sentry) return;
|
|
555
558
|
try {
|
|
@@ -726,6 +729,7 @@ export {
|
|
|
726
729
|
__setSentryForTest,
|
|
727
730
|
getCurrentSentryTraceId,
|
|
728
731
|
setDeploySentryTag,
|
|
732
|
+
markCodePath,
|
|
729
733
|
captureWarning,
|
|
730
734
|
flush
|
|
731
735
|
};
|
|
@@ -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.
|
|
9
|
+
version: "0.7.30-rc.0",
|
|
10
10
|
private: false,
|
|
11
11
|
repository: {
|
|
12
12
|
type: "git",
|
|
@@ -45,7 +45,7 @@ var package_default = {
|
|
|
45
45
|
"tools/release-retry-wrapper.mjs"
|
|
46
46
|
],
|
|
47
47
|
scripts: {
|
|
48
|
-
build: "tsup src/index.ts src/deploy.ts src/dotns.ts src/pool.ts src/telemetry.ts src/memory-report.ts src/merkle.ts src/gh-pages-mirror.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/manifest.ts src/chunk-probe.ts src/manifest-embed.ts src/manifest-fetch.ts src/manifest-roundtrip.ts src/incremental-stats.ts src/chunker.ts src/personhood/encoding.ts src/personhood/hashing.ts src/personhood/constants.ts src/personhood/member-key.ts src/personhood/people-client.ts src/personhood/reprove.ts src/personhood/bind-personal-id.ts src/personhood/claim-pgas.ts src/personhood/bind-paid-alias.ts src/personhood/bootstrap.ts src/manifest/types.ts src/manifest/schema.ts src/manifest/byte-budget.ts src/manifest/config-load.ts src/manifest/publish.ts --format esm --dts --clean --target node22",
|
|
48
|
+
build: "tsup src/index.ts src/deploy.ts src/dotns.ts src/pool.ts src/telemetry.ts src/memory-report.ts src/merkle.ts src/gh-pages-mirror.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/manifest.ts src/chunk-probe.ts src/manifest-embed.ts src/manifest-fetch.ts src/manifest-roundtrip.ts src/incremental-stats.ts src/chunker.ts src/personhood/encoding.ts src/personhood/hashing.ts src/personhood/constants.ts src/personhood/member-key.ts src/personhood/people-client.ts src/personhood/proof-validity.ts src/personhood/reprove.ts src/personhood/bind-personal-id.ts src/personhood/claim-pgas.ts src/personhood/bind-paid-alias.ts src/personhood/bootstrap.ts src/personhood/chain-prereqs.ts src/manifest/types.ts src/manifest/schema.ts src/manifest/byte-budget.ts src/manifest/config-load.ts src/manifest/publish.ts --format esm --dts --clean --target node22",
|
|
49
49
|
"refresh-environments": "node scripts/refresh-environments.mjs",
|
|
50
50
|
"check:watched-dependencies": "node tools/check-watched-dependencies.mjs",
|
|
51
51
|
prepare: "npm run build",
|
|
@@ -72,7 +72,7 @@ var package_default = {
|
|
|
72
72
|
jiti: "^2.4.2",
|
|
73
73
|
multiformats: "^13.4.1",
|
|
74
74
|
"polkadot-api": "^2.1.3",
|
|
75
|
-
verifiablejs: "
|
|
75
|
+
verifiablejs: "1.3.0-beta.4",
|
|
76
76
|
viem: "^2.30.5"
|
|
77
77
|
},
|
|
78
78
|
devDependencies: {
|