@fased/fased 0.1.64 → 0.1.65
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/CHANGELOG.md +16 -0
- package/README.md +16 -9
- package/config/signer-policies/README.md +10 -1
- package/config/signer-protocol-v2.json +2 -0
- package/dist/brand.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/control-ui/assets/{app-bR-fO5ty.js → app-MaQnPa5G.js} +5 -5
- package/dist/control-ui/assets/{index-ckCxHwjy.js → index-D4YMr1fA.js} +3 -3
- package/dist/control-ui/assets/{mining-BgHFh0ei.js → mining-qMYs4aD-.js} +120 -120
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -1
- package/dist/extensions/sat-mining/src/rpc-read.js +59 -20
- package/dist/extensions/sat-mining/src/solana-submit.js +251 -8
- package/dist/extensions/sat-mining/src/submission-ledger.js +1 -1
- package/dist/plugin-sdk/{audio-preflight-BYxAt775.js → audio-preflight-I4IngVlJ.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
- package/dist/plugin-sdk/{chunk-items-DIRHG2gJ.js → chunk-items-DLQ6_lLK.js} +1 -1
- package/dist/plugin-sdk/command-status.js +1 -1
- package/dist/plugin-sdk/{config-schema-BOT7kHb6.js → config-schema-D_8FVI1C.js} +28 -8
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/discord.d.ts +3 -3
- package/dist/plugin-sdk/index.d.ts +5 -5
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/{monitor-BCFDaqJ-.js → monitor-B4KF4Kpo.js} +3 -3
- package/dist/plugin-sdk/{monitor-BgbjRiPM.js → monitor-Bb6x1KAG.js} +3 -3
- package/dist/plugin-sdk/{openresponses-http-DFf87SMM.js → openresponses-http-DCTO8JkL.js} +1 -1
- package/dist/plugin-sdk/{pairing-message-CS-9BHug.d.ts → pairing-message-DHPDFZbC.d.ts} +1 -1
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
- package/dist/plugin-sdk/sat-runtime.d.ts +18 -2
- package/dist/plugin-sdk/sat-runtime.js +1 -1
- package/dist/plugin-sdk/{slack-BUTt8cxK.js → slack-BHmvqgjH.js} +3 -3
- package/dist/plugin-sdk/slack.d.ts +3 -3
- package/dist/plugin-sdk/{sticker-cache-D0wHVqjt.js → sticker-cache-By5AcorL.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-CC_qN4v0.js → telegram-actions-DGnBz1YT.js} +2 -2
- package/dist/plugin-sdk/telegram.d.ts +3 -3
- package/dist/plugin-sdk/{tmp-fased-dir-xOTGlzBE.d.ts → tmp-fased-dir-EJGTmL1Q.d.ts} +1 -1
- package/dist/plugin-sdk/{types-C3avNytw.d.ts → types-BdwdFCD6.d.ts} +2 -2
- package/dist/plugin-sdk/{types-DWfbSAaM.d.ts → types-BrCpYMxn.d.ts} +1 -1
- package/dist/plugin-sdk/{web-BXsJ1vqe.js → web-DUJwrTYs.js} +1 -1
- package/dist/plugin-sdk/whatsapp.d.ts +3 -3
- package/dist/wallet/local-socket-signer-protocol.js +18 -0
- package/dist/wallet/signer-protocol-v2.generated.js +2 -0
- package/dist/wallet/wallet-policy.js +3 -1
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/fased-federation/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +6 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/index.ts +89 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/sat-mining/src/audit-store.ts +45 -4
- package/extensions/sat-mining/src/client.ts +13 -0
- package/extensions/sat-mining/src/rpc-read.ts +105 -21
- package/extensions/sat-mining/src/runtime.ts +2 -0
- package/extensions/sat-mining/src/solana-submit.ts +358 -21
- package/extensions/sat-mining/src/submission-ledger.ts +2 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/install.sh +14 -18
- package/package.json +1 -1
- package/scripts/fased-managed-updater.mjs +1 -1
- package/scripts/fased-signer-owner-policy.mjs +13 -1
- package/scripts/start-managed.sh +4 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fased/memory-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.65",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "FasedAgent core memory search plugin",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@fased/fased": "^0.1.
|
|
8
|
+
"@fased/fased": "^0.1.65"
|
|
9
9
|
},
|
|
10
10
|
"fased": {
|
|
11
11
|
"extensions": [
|
|
@@ -141,6 +141,7 @@ import {
|
|
|
141
141
|
submitSatClaimUnallocatedStakingRewards,
|
|
142
142
|
submitSatClaimCycleRewards,
|
|
143
143
|
submitSatClaimCycleRewardsBatch,
|
|
144
|
+
submitSatCleanupDistributionLookupTable,
|
|
144
145
|
submitSatAbortEmptyCycle,
|
|
145
146
|
submitSatCompactPendingCycleRange,
|
|
146
147
|
submitSatCloseResolvedCycleArtifacts,
|
|
@@ -2258,6 +2259,9 @@ const satMiningPlugin = {
|
|
|
2258
2259
|
participants,
|
|
2259
2260
|
}),
|
|
2260
2261
|
),
|
|
2262
|
+
settlementPageLookupTables: Array.from(state.settlementPageLookupTables.entries()).map(
|
|
2263
|
+
([cacheKey, lookupTableAddress]) => ({ cacheKey, lookupTableAddress }),
|
|
2264
|
+
),
|
|
2261
2265
|
workers: state.workers,
|
|
2262
2266
|
lastKnownStatus: state.lastKnownStatus,
|
|
2263
2267
|
chainTime: state.chainTime,
|
|
@@ -2278,6 +2282,7 @@ const satMiningPlugin = {
|
|
|
2278
2282
|
state.roundExecution.clear();
|
|
2279
2283
|
state.claimBacklog.clear();
|
|
2280
2284
|
state.settlementPageParticipants.clear();
|
|
2285
|
+
state.settlementPageLookupTables.clear();
|
|
2281
2286
|
state.auditArtifacts.clear();
|
|
2282
2287
|
state.recentActions = [];
|
|
2283
2288
|
state.archivedFailures = [];
|
|
@@ -2344,6 +2349,12 @@ const satMiningPlugin = {
|
|
|
2344
2349
|
[...entry.participants],
|
|
2345
2350
|
]),
|
|
2346
2351
|
);
|
|
2352
|
+
state.settlementPageLookupTables = new Map(
|
|
2353
|
+
runtimeSummary.settlementPageLookupTables.map((entry) => [
|
|
2354
|
+
entry.cacheKey,
|
|
2355
|
+
entry.lookupTableAddress,
|
|
2356
|
+
]),
|
|
2357
|
+
);
|
|
2347
2358
|
if (runtimeSummary.workers.roundWatcher) {
|
|
2348
2359
|
state.workers.roundWatcher = runtimeSummary.workers.roundWatcher;
|
|
2349
2360
|
}
|
|
@@ -4521,6 +4532,11 @@ const satMiningPlugin = {
|
|
|
4521
4532
|
(await satOps
|
|
4522
4533
|
.inspectSatCycle(state.activeConfig, { cycleId: currentCycleId })
|
|
4523
4534
|
.catch(() => null));
|
|
4535
|
+
const currentSettlementProgress =
|
|
4536
|
+
statusAccounts?.currentSettlementProgress ??
|
|
4537
|
+
(await satOps
|
|
4538
|
+
.inspectSatCycleSettlementProgressV2(state.activeConfig, { cycleId: currentCycleId })
|
|
4539
|
+
.catch(() => null));
|
|
4524
4540
|
const currentMinerCycleState =
|
|
4525
4541
|
statusAccounts?.currentMinerCycle ??
|
|
4526
4542
|
(statusAuthority
|
|
@@ -5361,6 +5377,10 @@ const satMiningPlugin = {
|
|
|
5361
5377
|
nextOpenCycleLamports: rentExemptionLamports?.openCycleLamports ?? null,
|
|
5362
5378
|
nextSubmitCycleSharedLamports: rentExemptionLamports?.submitCycleSharedLamports ?? null,
|
|
5363
5379
|
nextSubmitCycleSignerLamports: rentExemptionLamports?.submitCycleSignerLamports ?? null,
|
|
5380
|
+
currentKeeperBountyPaidLamports:
|
|
5381
|
+
currentSettlementProgress?.keeperBountyPaidLamports ?? null,
|
|
5382
|
+
currentKeeperBountyUnpaidLamports:
|
|
5383
|
+
currentSettlementProgress?.keeperBountyUnpaidLamports ?? null,
|
|
5364
5384
|
currentCapitalAddress,
|
|
5365
5385
|
currentCapitalFundedLamports,
|
|
5366
5386
|
currentCapitalLockedLamports,
|
|
@@ -7719,6 +7739,12 @@ const satMiningPlugin = {
|
|
|
7719
7739
|
: Array.isArray((params as { minerAuthorities?: string[] })?.minerAuthorities)
|
|
7720
7740
|
? ((params as { minerAuthorities?: string[] }).minerAuthorities ?? [])
|
|
7721
7741
|
: [];
|
|
7742
|
+
const lookupTableAddress = String(
|
|
7743
|
+
(params as { lookupTableAddress?: string })?.lookupTableAddress ?? "",
|
|
7744
|
+
).trim();
|
|
7745
|
+
const lookupTableCacheKey = `${cycleId}:${pageIndex}`;
|
|
7746
|
+
const effectiveLookupTableAddress =
|
|
7747
|
+
lookupTableAddress || state.settlementPageLookupTables.get(lookupTableCacheKey) || "";
|
|
7722
7748
|
const request = state.client.buildDistributeCyclePageRequest({
|
|
7723
7749
|
cycleId,
|
|
7724
7750
|
pageIndex,
|
|
@@ -7727,13 +7753,28 @@ const satMiningPlugin = {
|
|
|
7727
7753
|
const submitted = await submitSatDistributeCyclePage(state.activeConfig, {
|
|
7728
7754
|
...request.params,
|
|
7729
7755
|
minerCycleAccounts,
|
|
7756
|
+
...(effectiveLookupTableAddress
|
|
7757
|
+
? { lookupTableAddress: effectiveLookupTableAddress }
|
|
7758
|
+
: {}),
|
|
7730
7759
|
});
|
|
7760
|
+
if (submitted.lookupTableAddress) {
|
|
7761
|
+
state.settlementPageLookupTables.set(lookupTableCacheKey, submitted.lookupTableAddress);
|
|
7762
|
+
}
|
|
7731
7763
|
markActionSuccess("distributeCyclePage", submitted.txHash, cycleId);
|
|
7732
7764
|
await persistRecentActions();
|
|
7733
7765
|
respond(
|
|
7734
7766
|
true,
|
|
7735
7767
|
jsonOk({
|
|
7736
|
-
request: {
|
|
7768
|
+
request: {
|
|
7769
|
+
...request,
|
|
7770
|
+
params: {
|
|
7771
|
+
...request.params,
|
|
7772
|
+
minerCycleAccounts,
|
|
7773
|
+
...(submitted.lookupTableAddress
|
|
7774
|
+
? { lookupTableAddress: submitted.lookupTableAddress }
|
|
7775
|
+
: {}),
|
|
7776
|
+
},
|
|
7777
|
+
},
|
|
7737
7778
|
submitted,
|
|
7738
7779
|
}),
|
|
7739
7780
|
);
|
|
@@ -7743,6 +7784,53 @@ const satMiningPlugin = {
|
|
|
7743
7784
|
}
|
|
7744
7785
|
});
|
|
7745
7786
|
|
|
7787
|
+
registerSatSubmissionMethod(
|
|
7788
|
+
"sat.cleanupDistributionLookupTable",
|
|
7789
|
+
async ({ params, respond }) => {
|
|
7790
|
+
const cycleId = Number((params as { cycleId?: number })?.cycleId ?? 0);
|
|
7791
|
+
try {
|
|
7792
|
+
const pageIndex = Number((params as { pageIndex?: number })?.pageIndex ?? 0);
|
|
7793
|
+
const action = String((params as { action?: string })?.action ?? "").trim();
|
|
7794
|
+
if (action !== "deactivate" && action !== "close") {
|
|
7795
|
+
throw new Error("SAT lookup-table cleanup action must be deactivate or close");
|
|
7796
|
+
}
|
|
7797
|
+
const cacheKey = `${cycleId}:${pageIndex}`;
|
|
7798
|
+
const lookupTableAddress =
|
|
7799
|
+
String((params as { lookupTableAddress?: string })?.lookupTableAddress ?? "").trim() ||
|
|
7800
|
+
state.settlementPageLookupTables.get(cacheKey) ||
|
|
7801
|
+
"";
|
|
7802
|
+
if (!lookupTableAddress) {
|
|
7803
|
+
throw new Error(`SAT distribution lookup table is unknown for ${cacheKey}`);
|
|
7804
|
+
}
|
|
7805
|
+
const submitted = await submitSatCleanupDistributionLookupTable(state.activeConfig, {
|
|
7806
|
+
lookupTableAddress,
|
|
7807
|
+
action,
|
|
7808
|
+
});
|
|
7809
|
+
if (action === "close") {
|
|
7810
|
+
state.settlementPageLookupTables.delete(cacheKey);
|
|
7811
|
+
} else {
|
|
7812
|
+
state.settlementPageLookupTables.set(cacheKey, lookupTableAddress);
|
|
7813
|
+
}
|
|
7814
|
+
markActionSuccess(
|
|
7815
|
+
"cleanupDistributionLookupTable",
|
|
7816
|
+
submitted.transactionHashes.at(-1),
|
|
7817
|
+
cycleId,
|
|
7818
|
+
);
|
|
7819
|
+
await persistRecentActions();
|
|
7820
|
+
respond(
|
|
7821
|
+
true,
|
|
7822
|
+
jsonOk({
|
|
7823
|
+
request: { cycleId, pageIndex, action, lookupTableAddress },
|
|
7824
|
+
submitted,
|
|
7825
|
+
}),
|
|
7826
|
+
);
|
|
7827
|
+
} catch (error) {
|
|
7828
|
+
markActionFailure("cleanupDistributionLookupTable", error, cycleId);
|
|
7829
|
+
respondGatewayError(respond, error);
|
|
7830
|
+
}
|
|
7831
|
+
},
|
|
7832
|
+
);
|
|
7833
|
+
|
|
7746
7834
|
registerSatSubmissionMethod("sat.claimCycleRewards", async ({ params, respond }) => {
|
|
7747
7835
|
const cycleId = Number((params as { cycleId?: number })?.cycleId ?? 0);
|
|
7748
7836
|
try {
|
|
@@ -294,6 +294,11 @@ export type SatPersistedSettlementPageParticipants = {
|
|
|
294
294
|
participants: string[];
|
|
295
295
|
};
|
|
296
296
|
|
|
297
|
+
export type SatPersistedSettlementPageLookupTable = {
|
|
298
|
+
cacheKey: string;
|
|
299
|
+
lookupTableAddress: string;
|
|
300
|
+
};
|
|
301
|
+
|
|
297
302
|
export type SatPersistedLastKnownStatus = {
|
|
298
303
|
walletId: string | null;
|
|
299
304
|
currentSolBalanceLamports: string | null;
|
|
@@ -317,7 +322,7 @@ export type SatPersistedLastKnownStatus = {
|
|
|
317
322
|
export type SatPersistedChainTime = SatChainTimeState;
|
|
318
323
|
|
|
319
324
|
type SatRuntimeStoreFile = {
|
|
320
|
-
version: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
325
|
+
version: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
321
326
|
recentActions: SatMiningRecentAction[];
|
|
322
327
|
archivedFailures?: SatMiningRecentAction[];
|
|
323
328
|
plannerHistory?: SatPlannerOutcomeMemory[];
|
|
@@ -326,6 +331,7 @@ type SatRuntimeStoreFile = {
|
|
|
326
331
|
roundExecution?: SatPersistedRoundExecution[];
|
|
327
332
|
claimBacklog?: SatClaimBacklogEntry[];
|
|
328
333
|
settlementPageParticipants?: SatPersistedSettlementPageParticipants[];
|
|
334
|
+
settlementPageLookupTables?: SatPersistedSettlementPageLookupTable[];
|
|
329
335
|
workers?: Partial<Record<SatMiningWorkerName, SatMiningWorkerState>>;
|
|
330
336
|
lastKnownStatus?: SatPersistedLastKnownStatus | null;
|
|
331
337
|
chainTime?: SatPersistedChainTime | null;
|
|
@@ -347,6 +353,7 @@ type SatRuntimeSummary = {
|
|
|
347
353
|
roundExecution: SatPersistedRoundExecution[];
|
|
348
354
|
claimBacklog: SatClaimBacklogEntry[];
|
|
349
355
|
settlementPageParticipants: SatPersistedSettlementPageParticipants[];
|
|
356
|
+
settlementPageLookupTables: SatPersistedSettlementPageLookupTable[];
|
|
350
357
|
workers: Partial<Record<SatMiningWorkerName, SatMiningWorkerState>>;
|
|
351
358
|
lastKnownStatus: SatPersistedLastKnownStatus | null;
|
|
352
359
|
chainTime: SatPersistedChainTime | null;
|
|
@@ -913,6 +920,25 @@ function trimSettlementPageParticipants(
|
|
|
913
920
|
return [...deduped.values()].slice(0, SAT_SETTLEMENT_PAGE_PARTICIPANT_CACHE_LIMIT);
|
|
914
921
|
}
|
|
915
922
|
|
|
923
|
+
function trimSettlementPageLookupTables(
|
|
924
|
+
entries: readonly SatPersistedSettlementPageLookupTable[] | null | undefined,
|
|
925
|
+
): SatPersistedSettlementPageLookupTable[] {
|
|
926
|
+
if (!Array.isArray(entries) || SAT_SETTLEMENT_PAGE_PARTICIPANT_CACHE_LIMIT <= 0) {
|
|
927
|
+
return [];
|
|
928
|
+
}
|
|
929
|
+
const deduped = new Map<string, SatPersistedSettlementPageLookupTable>();
|
|
930
|
+
for (const entry of entries) {
|
|
931
|
+
const cacheKey = typeof entry?.cacheKey === "string" ? entry.cacheKey.trim() : "";
|
|
932
|
+
const lookupTableAddress =
|
|
933
|
+
typeof entry?.lookupTableAddress === "string" ? entry.lookupTableAddress.trim() : "";
|
|
934
|
+
if (!cacheKey || !lookupTableAddress) {
|
|
935
|
+
continue;
|
|
936
|
+
}
|
|
937
|
+
deduped.set(cacheKey, { cacheKey, lookupTableAddress });
|
|
938
|
+
}
|
|
939
|
+
return [...deduped.values()].slice(0, SAT_SETTLEMENT_PAGE_PARTICIPANT_CACHE_LIMIT);
|
|
940
|
+
}
|
|
941
|
+
|
|
916
942
|
function emptySatRuntimeSummary(): SatRuntimeSummary {
|
|
917
943
|
return {
|
|
918
944
|
recentActions: [],
|
|
@@ -923,6 +949,7 @@ function emptySatRuntimeSummary(): SatRuntimeSummary {
|
|
|
923
949
|
roundExecution: [],
|
|
924
950
|
claimBacklog: [],
|
|
925
951
|
settlementPageParticipants: [],
|
|
952
|
+
settlementPageLookupTables: [],
|
|
926
953
|
workers: normalizeSatWorkers(undefined),
|
|
927
954
|
lastKnownStatus: null,
|
|
928
955
|
chainTime: null,
|
|
@@ -950,6 +977,7 @@ function normalizeSatRuntimeSummary(parsed: Partial<SatRuntimeStoreFile>): SatRu
|
|
|
950
977
|
roundExecution: trimSatRoundExecution(parsed.roundExecution),
|
|
951
978
|
claimBacklog: trimSatClaimBacklog(parsed.claimBacklog),
|
|
952
979
|
settlementPageParticipants: trimSettlementPageParticipants(parsed.settlementPageParticipants),
|
|
980
|
+
settlementPageLookupTables: trimSettlementPageLookupTables(parsed.settlementPageLookupTables),
|
|
953
981
|
workers: normalizeSatWorkers(parsed.workers),
|
|
954
982
|
lastKnownStatus: normalizeSatLastKnownStatus(parsed.lastKnownStatus),
|
|
955
983
|
chainTime: normalizeSatChainTime(parsed.chainTime),
|
|
@@ -973,7 +1001,7 @@ async function persistSatRuntimeSummary(
|
|
|
973
1001
|
summary: SatRuntimeSummary,
|
|
974
1002
|
): Promise<void> {
|
|
975
1003
|
const payload: SatRuntimeStoreFile = {
|
|
976
|
-
version:
|
|
1004
|
+
version: 12,
|
|
977
1005
|
recentActions: summary.recentActions,
|
|
978
1006
|
archivedFailures: [],
|
|
979
1007
|
plannerHistory: summary.plannerHistory,
|
|
@@ -982,6 +1010,7 @@ async function persistSatRuntimeSummary(
|
|
|
982
1010
|
roundExecution: summary.roundExecution,
|
|
983
1011
|
claimBacklog: summary.claimBacklog,
|
|
984
1012
|
settlementPageParticipants: summary.settlementPageParticipants,
|
|
1013
|
+
settlementPageLookupTables: summary.settlementPageLookupTables,
|
|
985
1014
|
workers: normalizeSatWorkers(summary.workers),
|
|
986
1015
|
lastKnownStatus: normalizeSatLastKnownStatus(summary.lastKnownStatus),
|
|
987
1016
|
chainTime: normalizeSatChainTime(summary.chainTime),
|
|
@@ -1095,7 +1124,8 @@ export async function readSatRecentActions(filePath: string): Promise<SatMiningR
|
|
|
1095
1124
|
parsed.version !== 8 &&
|
|
1096
1125
|
parsed.version !== 9 &&
|
|
1097
1126
|
parsed.version !== 10 &&
|
|
1098
|
-
parsed.version !== 11
|
|
1127
|
+
parsed.version !== 11 &&
|
|
1128
|
+
parsed.version !== 12) ||
|
|
1099
1129
|
!Array.isArray(parsed.recentActions)
|
|
1100
1130
|
) {
|
|
1101
1131
|
return [];
|
|
@@ -1121,7 +1151,8 @@ export async function readSatRuntimeSummary(filePath: string): Promise<SatRuntim
|
|
|
1121
1151
|
parsed.version !== 8 &&
|
|
1122
1152
|
parsed.version !== 9 &&
|
|
1123
1153
|
parsed.version !== 10 &&
|
|
1124
|
-
parsed.version !== 11
|
|
1154
|
+
parsed.version !== 11 &&
|
|
1155
|
+
parsed.version !== 12) ||
|
|
1125
1156
|
!Array.isArray(parsed.recentActions)
|
|
1126
1157
|
) {
|
|
1127
1158
|
return emptySatRuntimeSummary();
|
|
@@ -1156,6 +1187,12 @@ export async function readSatRuntimeSummary(filePath: string): Promise<SatRuntim
|
|
|
1156
1187
|
(Array.isArray(parsed.settlementPageParticipants)
|
|
1157
1188
|
? parsed.settlementPageParticipants.length
|
|
1158
1189
|
: 0);
|
|
1190
|
+
const hadSettlementPageLookupTables = Array.isArray(parsed.settlementPageLookupTables);
|
|
1191
|
+
const hadStaleSettlementPageLookupTables =
|
|
1192
|
+
normalized.settlementPageLookupTables.length !==
|
|
1193
|
+
(Array.isArray(parsed.settlementPageLookupTables)
|
|
1194
|
+
? parsed.settlementPageLookupTables.length
|
|
1195
|
+
: 0);
|
|
1159
1196
|
const hadWorkers =
|
|
1160
1197
|
parsed.workers != null &&
|
|
1161
1198
|
typeof parsed.workers === "object" &&
|
|
@@ -1177,6 +1214,8 @@ export async function readSatRuntimeSummary(filePath: string): Promise<SatRuntim
|
|
|
1177
1214
|
hadStaleClaimBacklog ||
|
|
1178
1215
|
!hadSettlementPageParticipants ||
|
|
1179
1216
|
hadStaleSettlementPageParticipants ||
|
|
1217
|
+
!hadSettlementPageLookupTables ||
|
|
1218
|
+
hadStaleSettlementPageLookupTables ||
|
|
1180
1219
|
!hadWorkers ||
|
|
1181
1220
|
!hadLastKnownStatus ||
|
|
1182
1221
|
!hadChainTime
|
|
@@ -1472,6 +1511,7 @@ export async function writeSatRecentActions(
|
|
|
1472
1511
|
roundExecution?: readonly SatPersistedRoundExecution[];
|
|
1473
1512
|
claimBacklog?: readonly SatClaimBacklogEntry[];
|
|
1474
1513
|
settlementPageParticipants?: readonly SatPersistedSettlementPageParticipants[];
|
|
1514
|
+
settlementPageLookupTables?: readonly SatPersistedSettlementPageLookupTable[];
|
|
1475
1515
|
workers?: Partial<Record<SatMiningWorkerName, SatMiningWorkerState>>;
|
|
1476
1516
|
lastKnownStatus?: SatPersistedLastKnownStatus | null;
|
|
1477
1517
|
chainTime?: SatPersistedChainTime | null;
|
|
@@ -1497,6 +1537,7 @@ export async function writeSatRecentActions(
|
|
|
1497
1537
|
roundExecution: trimSatRoundExecution(summary?.roundExecution),
|
|
1498
1538
|
claimBacklog: trimSatClaimBacklog(summary?.claimBacklog),
|
|
1499
1539
|
settlementPageParticipants: trimSettlementPageParticipants(summary?.settlementPageParticipants),
|
|
1540
|
+
settlementPageLookupTables: trimSettlementPageLookupTables(summary?.settlementPageLookupTables),
|
|
1500
1541
|
workers: normalizeSatWorkers(summary?.workers),
|
|
1501
1542
|
lastKnownStatus: normalizeSatLastKnownStatus(summary?.lastKnownStatus),
|
|
1502
1543
|
chainTime: normalizeSatChainTime(summary?.chainTime),
|
|
@@ -11,6 +11,7 @@ export const SAT_GATEWAY_METHODS = {
|
|
|
11
11
|
finalizeCycleSettlement: "sat.finalizeCycleSettlement",
|
|
12
12
|
scoreCyclePage: "sat.scoreCyclePage",
|
|
13
13
|
distributeCyclePage: "sat.distributeCyclePage",
|
|
14
|
+
cleanupDistributionLookupTable: "sat.cleanupDistributionLookupTable",
|
|
14
15
|
claimCycleRewards: "sat.claimCycleRewards",
|
|
15
16
|
claimCycleRewardsBatch: "sat.claimCycleRewardsBatch",
|
|
16
17
|
retargetUnlock: "sat.retargetUnlock",
|
|
@@ -128,6 +129,18 @@ export class SatMiningClient {
|
|
|
128
129
|
};
|
|
129
130
|
}
|
|
130
131
|
|
|
132
|
+
buildCleanupDistributionLookupTableRequest(params: {
|
|
133
|
+
cycleId: number;
|
|
134
|
+
pageIndex: number;
|
|
135
|
+
action: "deactivate" | "close";
|
|
136
|
+
lookupTableAddress?: string;
|
|
137
|
+
}) {
|
|
138
|
+
return {
|
|
139
|
+
method: SAT_GATEWAY_METHODS.cleanupDistributionLookupTable,
|
|
140
|
+
params,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
131
144
|
buildRetargetUnlockRequest(params: { cycleId: number }) {
|
|
132
145
|
return {
|
|
133
146
|
method: SAT_GATEWAY_METHODS.retargetUnlock,
|