@xyo-network/xl1-protocol 5.1.3 → 5.2.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/dist/neutral/modules/network-model/staticRest/layout/chainParams.d.ts +371 -0
- package/dist/neutral/modules/network-model/staticRest/layout/chainParams.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/layout/chainParamsRules.d.ts +36 -0
- package/dist/neutral/modules/network-model/staticRest/layout/chainParamsRules.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/layout/index.d.ts +3 -0
- package/dist/neutral/modules/network-model/staticRest/layout/index.d.ts.map +1 -1
- package/dist/neutral/modules/network-model/staticRest/layout/trustedPosture.d.ts +81 -0
- package/dist/neutral/modules/network-model/staticRest/layout/trustedPosture.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/paths/chainState.d.ts +7 -0
- package/dist/neutral/modules/network-model/staticRest/paths/chainState.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.d.ts +37 -3
- package/dist/neutral/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/validation/payload/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-lib/validation/payload/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/validation/payload/ruleGate.d.ts +29 -0
- package/dist/neutral/modules/protocol-lib/validation/payload/ruleGate.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-lib/viewers/ChainParams.d.ts +26 -0
- package/dist/neutral/modules/protocol-lib/viewers/ChainParams.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-lib/viewers/StakeSnapshot.d.ts +39 -0
- package/dist/neutral/modules/protocol-lib/viewers/StakeSnapshot.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-lib/viewers/index.d.ts +3 -0
- package/dist/neutral/modules/protocol-lib/viewers/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/AllowedBlockPayload.d.ts +14 -2
- package/dist/neutral/modules/protocol-model/block/AllowedBlockPayload.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/BlockBoundWitness.d.ts +19 -0
- package/dist/neutral/modules/protocol-model/block/BlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/HydratedBlock.d.ts +44 -0
- package/dist/neutral/modules/protocol-model/block/HydratedBlock.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitness.d.ts +6 -0
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts +10 -0
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts +12 -0
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/unsigned/UnsignedBlockBoundWitness.d.ts +6 -0
- package/dist/neutral/modules/protocol-model/block/unsigned/UnsignedBlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/evidence/EvidenceDisposition.d.ts +1 -1
- package/dist/neutral/modules/protocol-model/evidence/EvidenceNotePayload.d.ts +1 -1
- package/dist/neutral/modules/protocol-model/model/AccountBalance.d.ts +1 -0
- package/dist/neutral/modules/protocol-model/model/AccountBalance.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/Context/ChainContext.zod.d.ts +3 -0
- package/dist/neutral/modules/protocol-model/model/Context/ChainContext.zod.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/Context/HeadContext.zod.d.ts +2 -0
- package/dist/neutral/modules/protocol-model/model/Context/HeadContext.zod.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/OffenseCode.d.ts +13 -0
- package/dist/neutral/modules/protocol-model/model/OffenseCode.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/model/RuleActivation.d.ts +63 -0
- package/dist/neutral/modules/protocol-model/model/RuleActivation.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/model/SyncStepSummary.d.ts +6 -0
- package/dist/neutral/modules/protocol-model/model/SyncStepSummary.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/index.d.ts +2 -0
- package/dist/neutral/modules/protocol-model/model/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/version.d.ts +2 -2
- package/dist/neutral/modules/protocol-model/payload/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-model/payload/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/payload/slash/SlashAdjudicationPayload.d.ts +51 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashAdjudicationPayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashChallengePayload.d.ts +33 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashChallengePayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashCommitPayload.d.ts +35 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashCommitPayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashEvidencePayload.d.ts +33 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashEvidencePayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashRequestPayload.d.ts +46 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashRequestPayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/index.d.ts +6 -0
- package/dist/neutral/modules/protocol-model/payload/slash/index.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/rejection/BlockRejectionPayload.d.ts +4 -0
- package/dist/neutral/modules/protocol-model/rejection/BlockRejectionPayload.d.ts.map +1 -1
- package/dist/neutral/network-model.mjs +328 -114
- package/dist/neutral/network-model.mjs.map +4 -4
- package/dist/neutral/protocol-lib.mjs +27 -0
- package/dist/neutral/protocol-lib.mjs.map +3 -3
- package/dist/neutral/protocol-model.mjs +505 -296
- package/dist/neutral/protocol-model.mjs.map +4 -4
- package/package.json +3 -3
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Schema id for the chain parameter register document. */
|
|
3
|
+
export declare const ChainParamsSchema: "network.xyo.s3.chain.params" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
6
|
+
/** Type literal for the chain parameter register schema. */
|
|
7
|
+
export type ChainParamsSchema = typeof ChainParamsSchema;
|
|
8
|
+
/** Bumped when the register shape changes, so readers can detect a mismatch. */
|
|
9
|
+
export declare const CHAIN_PARAMS_VERSION = 1;
|
|
10
|
+
/** Zod schema for a rule identifier. */
|
|
11
|
+
export declare const RuleIdZod: z.ZodEnum<{
|
|
12
|
+
"intent-binding": "intent-binding";
|
|
13
|
+
"anchor-rules": "anchor-rules";
|
|
14
|
+
"single-signer": "single-signer";
|
|
15
|
+
"supersedes-field": "supersedes-field";
|
|
16
|
+
"slash-payloads": "slash-payloads";
|
|
17
|
+
"eligibility-admission": "eligibility-admission";
|
|
18
|
+
"attestation-admission": "attestation-admission";
|
|
19
|
+
"certificate-execution": "certificate-execution";
|
|
20
|
+
"equivocation.reportable": "equivocation.reportable";
|
|
21
|
+
"invalid-block.reportable": "invalid-block.reportable";
|
|
22
|
+
"reward-overmint.reportable": "reward-overmint.reportable";
|
|
23
|
+
"false-anchor.reportable": "false-anchor.reportable";
|
|
24
|
+
"ineligible-production.reportable": "ineligible-production.reportable";
|
|
25
|
+
"invalid-slash-request.reportable": "invalid-slash-request.reportable";
|
|
26
|
+
"false-attestation.reportable": "false-attestation.reportable";
|
|
27
|
+
"equivocation.adjudicable": "equivocation.adjudicable";
|
|
28
|
+
"invalid-block.adjudicable": "invalid-block.adjudicable";
|
|
29
|
+
"reward-overmint.adjudicable": "reward-overmint.adjudicable";
|
|
30
|
+
"false-anchor.adjudicable": "false-anchor.adjudicable";
|
|
31
|
+
"ineligible-production.adjudicable": "ineligible-production.adjudicable";
|
|
32
|
+
"invalid-slash-request.adjudicable": "invalid-slash-request.adjudicable";
|
|
33
|
+
"false-attestation.adjudicable": "false-attestation.adjudicable";
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Zod schema for one version of the chain parameter register.
|
|
37
|
+
*
|
|
38
|
+
* The register is the control plane: which rules are on, from what height, and the numbers they
|
|
39
|
+
* use. A register that activates nothing describes a network running exactly as it did before
|
|
40
|
+
* any of this existed, which is what makes trusted operation a posture rather than an old build.
|
|
41
|
+
*/
|
|
42
|
+
export declare const ChainParamsZod: z.ZodObject<{
|
|
43
|
+
activations: z.ZodRecord<z.ZodEnum<{
|
|
44
|
+
"intent-binding": "intent-binding";
|
|
45
|
+
"anchor-rules": "anchor-rules";
|
|
46
|
+
"single-signer": "single-signer";
|
|
47
|
+
"supersedes-field": "supersedes-field";
|
|
48
|
+
"slash-payloads": "slash-payloads";
|
|
49
|
+
"eligibility-admission": "eligibility-admission";
|
|
50
|
+
"attestation-admission": "attestation-admission";
|
|
51
|
+
"certificate-execution": "certificate-execution";
|
|
52
|
+
"equivocation.reportable": "equivocation.reportable";
|
|
53
|
+
"invalid-block.reportable": "invalid-block.reportable";
|
|
54
|
+
"reward-overmint.reportable": "reward-overmint.reportable";
|
|
55
|
+
"false-anchor.reportable": "false-anchor.reportable";
|
|
56
|
+
"ineligible-production.reportable": "ineligible-production.reportable";
|
|
57
|
+
"invalid-slash-request.reportable": "invalid-slash-request.reportable";
|
|
58
|
+
"false-attestation.reportable": "false-attestation.reportable";
|
|
59
|
+
"equivocation.adjudicable": "equivocation.adjudicable";
|
|
60
|
+
"invalid-block.adjudicable": "invalid-block.adjudicable";
|
|
61
|
+
"reward-overmint.adjudicable": "reward-overmint.adjudicable";
|
|
62
|
+
"false-anchor.adjudicable": "false-anchor.adjudicable";
|
|
63
|
+
"ineligible-production.adjudicable": "ineligible-production.adjudicable";
|
|
64
|
+
"invalid-slash-request.adjudicable": "invalid-slash-request.adjudicable";
|
|
65
|
+
"false-attestation.adjudicable": "false-attestation.adjudicable";
|
|
66
|
+
}> & z.core.$partial, z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBigInt]>, z.ZodTransform<number, string | number | bigint>>, z.ZodNumber>, z.ZodInt>>;
|
|
67
|
+
arbiter: z.ZodString;
|
|
68
|
+
attestationRewardBps: z.ZodInt;
|
|
69
|
+
bountyCapAtto: z.ZodString;
|
|
70
|
+
bountyShareBps: z.ZodInt;
|
|
71
|
+
burnFloorBps: z.ZodInt;
|
|
72
|
+
catalogVersion: z.ZodInt;
|
|
73
|
+
chainId: import("zod/mini").ZodMiniPipe<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniTransform<import("@ariestools/sdk").BrandedHex, string>>;
|
|
74
|
+
challengeWindowEvmBlocks: z.ZodInt;
|
|
75
|
+
deactivations: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
76
|
+
"intent-binding": "intent-binding";
|
|
77
|
+
"anchor-rules": "anchor-rules";
|
|
78
|
+
"single-signer": "single-signer";
|
|
79
|
+
"supersedes-field": "supersedes-field";
|
|
80
|
+
"slash-payloads": "slash-payloads";
|
|
81
|
+
"eligibility-admission": "eligibility-admission";
|
|
82
|
+
"attestation-admission": "attestation-admission";
|
|
83
|
+
"certificate-execution": "certificate-execution";
|
|
84
|
+
"equivocation.reportable": "equivocation.reportable";
|
|
85
|
+
"invalid-block.reportable": "invalid-block.reportable";
|
|
86
|
+
"reward-overmint.reportable": "reward-overmint.reportable";
|
|
87
|
+
"false-anchor.reportable": "false-anchor.reportable";
|
|
88
|
+
"ineligible-production.reportable": "ineligible-production.reportable";
|
|
89
|
+
"invalid-slash-request.reportable": "invalid-slash-request.reportable";
|
|
90
|
+
"false-attestation.reportable": "false-attestation.reportable";
|
|
91
|
+
"equivocation.adjudicable": "equivocation.adjudicable";
|
|
92
|
+
"invalid-block.adjudicable": "invalid-block.adjudicable";
|
|
93
|
+
"reward-overmint.adjudicable": "reward-overmint.adjudicable";
|
|
94
|
+
"false-anchor.adjudicable": "false-anchor.adjudicable";
|
|
95
|
+
"ineligible-production.adjudicable": "ineligible-production.adjudicable";
|
|
96
|
+
"invalid-slash-request.adjudicable": "invalid-slash-request.adjudicable";
|
|
97
|
+
"false-attestation.adjudicable": "false-attestation.adjudicable";
|
|
98
|
+
}> & z.core.$partial, z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBigInt]>, z.ZodTransform<number, string | number | bigint>>, z.ZodNumber>, z.ZodInt>>>;
|
|
99
|
+
evidenceFreshnessEvmBlocks: z.ZodInt;
|
|
100
|
+
evidenceRetentionXl1Blocks: z.ZodInt;
|
|
101
|
+
executionDelayEvmBlocks: z.ZodInt;
|
|
102
|
+
freshnessBandEvmBlocks: z.ZodInt;
|
|
103
|
+
graceBandXl1Blocks: z.ZodInt;
|
|
104
|
+
maturityEvmBlocks: z.ZodInt;
|
|
105
|
+
minProducerSelfBondAtto: z.ZodString;
|
|
106
|
+
minProducerStakeAtto: z.ZodString;
|
|
107
|
+
minStakeAgeEvmBlocks: z.ZodInt;
|
|
108
|
+
minValidatorStakeAtto: z.ZodString;
|
|
109
|
+
opsAllowanceEvmBlocks: z.ZodInt;
|
|
110
|
+
protocolMin: z.ZodInt;
|
|
111
|
+
reporterDepositAtto: z.ZodString;
|
|
112
|
+
revealDelayEvmBlocks: z.ZodInt;
|
|
113
|
+
revealDelayXl1Blocks: z.ZodInt;
|
|
114
|
+
revealWindowEvmBlocks: z.ZodInt;
|
|
115
|
+
revealWindowXl1Blocks: z.ZodInt;
|
|
116
|
+
rewardSource: z.ZodEnum<{
|
|
117
|
+
schedule: "schedule";
|
|
118
|
+
contract: "contract";
|
|
119
|
+
}>;
|
|
120
|
+
schema: z.ZodLiteral<"network.xyo.s3.chain.params" & {
|
|
121
|
+
readonly __schema: true;
|
|
122
|
+
}>;
|
|
123
|
+
slashFractionsBps: z.ZodRecord<z.ZodEnum<{
|
|
124
|
+
equivocation: "equivocation";
|
|
125
|
+
"invalid-block": "invalid-block";
|
|
126
|
+
"reward-overmint": "reward-overmint";
|
|
127
|
+
"false-anchor": "false-anchor";
|
|
128
|
+
"ineligible-production": "ineligible-production";
|
|
129
|
+
"invalid-slash-request": "invalid-slash-request";
|
|
130
|
+
"false-attestation": "false-attestation";
|
|
131
|
+
}> & z.core.$partial, z.ZodInt>;
|
|
132
|
+
slashQuorumCount: z.ZodInt;
|
|
133
|
+
version: z.ZodInt;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
/** One version of the chain parameter register. */
|
|
136
|
+
export type ChainParams = z.infer<typeof ChainParamsZod>;
|
|
137
|
+
/** Numeric-input-tolerant shape accepted when creating a register version. */
|
|
138
|
+
export type ChainParamsInput = z.input<typeof ChainParamsZod>;
|
|
139
|
+
/** Type guard that checks if a value is a valid ChainParams. */
|
|
140
|
+
export declare const isChainParams: <T>(value: T) => value is T & {
|
|
141
|
+
activations: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>>;
|
|
142
|
+
arbiter: string;
|
|
143
|
+
attestationRewardBps: number;
|
|
144
|
+
bountyCapAtto: string;
|
|
145
|
+
bountyShareBps: number;
|
|
146
|
+
burnFloorBps: number;
|
|
147
|
+
catalogVersion: number;
|
|
148
|
+
chainId: import("@ariestools/sdk").BrandedHex;
|
|
149
|
+
challengeWindowEvmBlocks: number;
|
|
150
|
+
evidenceFreshnessEvmBlocks: number;
|
|
151
|
+
evidenceRetentionXl1Blocks: number;
|
|
152
|
+
executionDelayEvmBlocks: number;
|
|
153
|
+
freshnessBandEvmBlocks: number;
|
|
154
|
+
graceBandXl1Blocks: number;
|
|
155
|
+
maturityEvmBlocks: number;
|
|
156
|
+
minProducerSelfBondAtto: string;
|
|
157
|
+
minProducerStakeAtto: string;
|
|
158
|
+
minStakeAgeEvmBlocks: number;
|
|
159
|
+
minValidatorStakeAtto: string;
|
|
160
|
+
opsAllowanceEvmBlocks: number;
|
|
161
|
+
protocolMin: number;
|
|
162
|
+
reporterDepositAtto: string;
|
|
163
|
+
revealDelayEvmBlocks: number;
|
|
164
|
+
revealDelayXl1Blocks: number;
|
|
165
|
+
revealWindowEvmBlocks: number;
|
|
166
|
+
revealWindowXl1Blocks: number;
|
|
167
|
+
rewardSource: "schedule" | "contract";
|
|
168
|
+
schema: "network.xyo.s3.chain.params" & {
|
|
169
|
+
readonly __schema: true;
|
|
170
|
+
};
|
|
171
|
+
slashFractionsBps: Partial<Record<"equivocation" | "invalid-block" | "reward-overmint" | "false-anchor" | "ineligible-production" | "invalid-slash-request" | "false-attestation", number>>;
|
|
172
|
+
slashQuorumCount: number;
|
|
173
|
+
version: number;
|
|
174
|
+
deactivations?: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>> | undefined;
|
|
175
|
+
};
|
|
176
|
+
/** Converts a value to ChainParams, throwing if invalid. */
|
|
177
|
+
export declare const asChainParams: {
|
|
178
|
+
<T>(value: T): (T & {
|
|
179
|
+
activations: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>>;
|
|
180
|
+
arbiter: string;
|
|
181
|
+
attestationRewardBps: number;
|
|
182
|
+
bountyCapAtto: string;
|
|
183
|
+
bountyShareBps: number;
|
|
184
|
+
burnFloorBps: number;
|
|
185
|
+
catalogVersion: number;
|
|
186
|
+
chainId: import("@ariestools/sdk").BrandedHex;
|
|
187
|
+
challengeWindowEvmBlocks: number;
|
|
188
|
+
evidenceFreshnessEvmBlocks: number;
|
|
189
|
+
evidenceRetentionXl1Blocks: number;
|
|
190
|
+
executionDelayEvmBlocks: number;
|
|
191
|
+
freshnessBandEvmBlocks: number;
|
|
192
|
+
graceBandXl1Blocks: number;
|
|
193
|
+
maturityEvmBlocks: number;
|
|
194
|
+
minProducerSelfBondAtto: string;
|
|
195
|
+
minProducerStakeAtto: string;
|
|
196
|
+
minStakeAgeEvmBlocks: number;
|
|
197
|
+
minValidatorStakeAtto: string;
|
|
198
|
+
opsAllowanceEvmBlocks: number;
|
|
199
|
+
protocolMin: number;
|
|
200
|
+
reporterDepositAtto: string;
|
|
201
|
+
revealDelayEvmBlocks: number;
|
|
202
|
+
revealDelayXl1Blocks: number;
|
|
203
|
+
revealWindowEvmBlocks: number;
|
|
204
|
+
revealWindowXl1Blocks: number;
|
|
205
|
+
rewardSource: "schedule" | "contract";
|
|
206
|
+
schema: "network.xyo.s3.chain.params" & {
|
|
207
|
+
readonly __schema: true;
|
|
208
|
+
};
|
|
209
|
+
slashFractionsBps: Partial<Record<"equivocation" | "invalid-block" | "reward-overmint" | "false-anchor" | "ineligible-production" | "invalid-slash-request" | "false-attestation", number>>;
|
|
210
|
+
slashQuorumCount: number;
|
|
211
|
+
version: number;
|
|
212
|
+
deactivations?: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>> | undefined;
|
|
213
|
+
}) | undefined;
|
|
214
|
+
<T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
|
|
215
|
+
activations: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>>;
|
|
216
|
+
arbiter: string;
|
|
217
|
+
attestationRewardBps: number;
|
|
218
|
+
bountyCapAtto: string;
|
|
219
|
+
bountyShareBps: number;
|
|
220
|
+
burnFloorBps: number;
|
|
221
|
+
catalogVersion: number;
|
|
222
|
+
chainId: import("@ariestools/sdk").BrandedHex;
|
|
223
|
+
challengeWindowEvmBlocks: number;
|
|
224
|
+
evidenceFreshnessEvmBlocks: number;
|
|
225
|
+
evidenceRetentionXl1Blocks: number;
|
|
226
|
+
executionDelayEvmBlocks: number;
|
|
227
|
+
freshnessBandEvmBlocks: number;
|
|
228
|
+
graceBandXl1Blocks: number;
|
|
229
|
+
maturityEvmBlocks: number;
|
|
230
|
+
minProducerSelfBondAtto: string;
|
|
231
|
+
minProducerStakeAtto: string;
|
|
232
|
+
minStakeAgeEvmBlocks: number;
|
|
233
|
+
minValidatorStakeAtto: string;
|
|
234
|
+
opsAllowanceEvmBlocks: number;
|
|
235
|
+
protocolMin: number;
|
|
236
|
+
reporterDepositAtto: string;
|
|
237
|
+
revealDelayEvmBlocks: number;
|
|
238
|
+
revealDelayXl1Blocks: number;
|
|
239
|
+
revealWindowEvmBlocks: number;
|
|
240
|
+
revealWindowXl1Blocks: number;
|
|
241
|
+
rewardSource: "schedule" | "contract";
|
|
242
|
+
schema: "network.xyo.s3.chain.params" & {
|
|
243
|
+
readonly __schema: true;
|
|
244
|
+
};
|
|
245
|
+
slashFractionsBps: Partial<Record<"equivocation" | "invalid-block" | "reward-overmint" | "false-anchor" | "ineligible-production" | "invalid-slash-request" | "false-attestation", number>>;
|
|
246
|
+
slashQuorumCount: number;
|
|
247
|
+
version: number;
|
|
248
|
+
deactivations?: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>> | undefined;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
/** Non-validating cast to ChainParams. */
|
|
252
|
+
export declare const toChainParams: {
|
|
253
|
+
(value: unknown): {
|
|
254
|
+
activations: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>>;
|
|
255
|
+
arbiter: string;
|
|
256
|
+
attestationRewardBps: number;
|
|
257
|
+
bountyCapAtto: string;
|
|
258
|
+
bountyShareBps: number;
|
|
259
|
+
burnFloorBps: number;
|
|
260
|
+
catalogVersion: number;
|
|
261
|
+
chainId: import("@ariestools/sdk").BrandedHex;
|
|
262
|
+
challengeWindowEvmBlocks: number;
|
|
263
|
+
evidenceFreshnessEvmBlocks: number;
|
|
264
|
+
evidenceRetentionXl1Blocks: number;
|
|
265
|
+
executionDelayEvmBlocks: number;
|
|
266
|
+
freshnessBandEvmBlocks: number;
|
|
267
|
+
graceBandXl1Blocks: number;
|
|
268
|
+
maturityEvmBlocks: number;
|
|
269
|
+
minProducerSelfBondAtto: string;
|
|
270
|
+
minProducerStakeAtto: string;
|
|
271
|
+
minStakeAgeEvmBlocks: number;
|
|
272
|
+
minValidatorStakeAtto: string;
|
|
273
|
+
opsAllowanceEvmBlocks: number;
|
|
274
|
+
protocolMin: number;
|
|
275
|
+
reporterDepositAtto: string;
|
|
276
|
+
revealDelayEvmBlocks: number;
|
|
277
|
+
revealDelayXl1Blocks: number;
|
|
278
|
+
revealWindowEvmBlocks: number;
|
|
279
|
+
revealWindowXl1Blocks: number;
|
|
280
|
+
rewardSource: "schedule" | "contract";
|
|
281
|
+
schema: "network.xyo.s3.chain.params" & {
|
|
282
|
+
readonly __schema: true;
|
|
283
|
+
};
|
|
284
|
+
slashFractionsBps: Partial<Record<"equivocation" | "invalid-block" | "reward-overmint" | "false-anchor" | "ineligible-production" | "invalid-slash-request" | "false-attestation", number>>;
|
|
285
|
+
slashQuorumCount: number;
|
|
286
|
+
version: number;
|
|
287
|
+
deactivations?: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>> | undefined;
|
|
288
|
+
} | undefined;
|
|
289
|
+
(value: unknown, assert: import("@ariestools/sdk").ZodFactoryConfig): {
|
|
290
|
+
activations: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>>;
|
|
291
|
+
arbiter: string;
|
|
292
|
+
attestationRewardBps: number;
|
|
293
|
+
bountyCapAtto: string;
|
|
294
|
+
bountyShareBps: number;
|
|
295
|
+
burnFloorBps: number;
|
|
296
|
+
catalogVersion: number;
|
|
297
|
+
chainId: import("@ariestools/sdk").BrandedHex;
|
|
298
|
+
challengeWindowEvmBlocks: number;
|
|
299
|
+
evidenceFreshnessEvmBlocks: number;
|
|
300
|
+
evidenceRetentionXl1Blocks: number;
|
|
301
|
+
executionDelayEvmBlocks: number;
|
|
302
|
+
freshnessBandEvmBlocks: number;
|
|
303
|
+
graceBandXl1Blocks: number;
|
|
304
|
+
maturityEvmBlocks: number;
|
|
305
|
+
minProducerSelfBondAtto: string;
|
|
306
|
+
minProducerStakeAtto: string;
|
|
307
|
+
minStakeAgeEvmBlocks: number;
|
|
308
|
+
minValidatorStakeAtto: string;
|
|
309
|
+
opsAllowanceEvmBlocks: number;
|
|
310
|
+
protocolMin: number;
|
|
311
|
+
reporterDepositAtto: string;
|
|
312
|
+
revealDelayEvmBlocks: number;
|
|
313
|
+
revealDelayXl1Blocks: number;
|
|
314
|
+
revealWindowEvmBlocks: number;
|
|
315
|
+
revealWindowXl1Blocks: number;
|
|
316
|
+
rewardSource: "schedule" | "contract";
|
|
317
|
+
schema: "network.xyo.s3.chain.params" & {
|
|
318
|
+
readonly __schema: true;
|
|
319
|
+
};
|
|
320
|
+
slashFractionsBps: Partial<Record<"equivocation" | "invalid-block" | "reward-overmint" | "false-anchor" | "ineligible-production" | "invalid-slash-request" | "false-attestation", number>>;
|
|
321
|
+
slashQuorumCount: number;
|
|
322
|
+
version: number;
|
|
323
|
+
deactivations?: Partial<Record<"intent-binding" | "anchor-rules" | "single-signer" | "supersedes-field" | "slash-payloads" | "eligibility-admission" | "attestation-admission" | "certificate-execution" | "equivocation.reportable" | "invalid-block.reportable" | "reward-overmint.reportable" | "false-anchor.reportable" | "ineligible-production.reportable" | "invalid-slash-request.reportable" | "false-attestation.reportable" | "equivocation.adjudicable" | "invalid-block.adjudicable" | "reward-overmint.adjudicable" | "false-anchor.adjudicable" | "ineligible-production.adjudicable" | "invalid-slash-request.adjudicable" | "false-attestation.adjudicable", number>> | undefined;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
/** Schema id for the register head pointer. */
|
|
327
|
+
export declare const ChainParamsHeadSchema: "network.xyo.s3.chain.params.head" & {
|
|
328
|
+
readonly __schema: true;
|
|
329
|
+
};
|
|
330
|
+
/** Type literal for the register head schema. */
|
|
331
|
+
export type ChainParamsHeadSchema = typeof ChainParamsHeadSchema;
|
|
332
|
+
/** Zod schema for the mutable pointer naming the current register version. */
|
|
333
|
+
export declare const ChainParamsHeadZod: z.ZodObject<{
|
|
334
|
+
hash: z.ZodString;
|
|
335
|
+
schema: z.ZodLiteral<"network.xyo.s3.chain.params.head" & {
|
|
336
|
+
readonly __schema: true;
|
|
337
|
+
}>;
|
|
338
|
+
version: z.ZodInt;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
/** The mutable pointer naming the current register version. */
|
|
341
|
+
export type ChainParamsHead = z.infer<typeof ChainParamsHeadZod>;
|
|
342
|
+
/** Type guard that checks if a value is a valid ChainParamsHead. */
|
|
343
|
+
export declare const isChainParamsHead: <T>(value: T) => value is T & {
|
|
344
|
+
hash: string;
|
|
345
|
+
schema: "network.xyo.s3.chain.params.head" & {
|
|
346
|
+
readonly __schema: true;
|
|
347
|
+
};
|
|
348
|
+
version: number;
|
|
349
|
+
};
|
|
350
|
+
/** Converts a value to ChainParamsHead, throwing if invalid. */
|
|
351
|
+
export declare const asChainParamsHead: {
|
|
352
|
+
<T>(value: T): (T & {
|
|
353
|
+
hash: string;
|
|
354
|
+
schema: "network.xyo.s3.chain.params.head" & {
|
|
355
|
+
readonly __schema: true;
|
|
356
|
+
};
|
|
357
|
+
version: number;
|
|
358
|
+
}) | undefined;
|
|
359
|
+
<T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
|
|
360
|
+
hash: string;
|
|
361
|
+
schema: "network.xyo.s3.chain.params.head" & {
|
|
362
|
+
readonly __schema: true;
|
|
363
|
+
};
|
|
364
|
+
version: number;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
/** Builds a validated register version. */
|
|
368
|
+
export declare function createChainParams(config: Omit<ChainParamsInput, 'schema'>): ChainParams;
|
|
369
|
+
/** Builds a validated register head pointer. */
|
|
370
|
+
export declare function createChainParamsHead(version: number, hash: string): ChainParamsHead;
|
|
371
|
+
//# sourceMappingURL=chainParams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainParams.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/chainParams.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB;;CAAgD,CAAA;AAC9E,4DAA4D;AAC5D,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAA;AAExD,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,IAAI,CAAA;AAKrC,wCAAwC;AACxC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;EAAkB,CAAA;AAKxC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgEzB,CAAA;AAEF,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAExD,8EAA8E;AAC9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE7D,gEAAgE;AAChE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA+B,CAAA;AACzD,4DAA4D;AAC5D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgD,CAAA;AAC1E,0CAA0C;AAC1C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgD,CAAA;AAE1E,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB;;CAAqD,CAAA;AACvF,iDAAiD;AACjD,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB;;;;;;iBAM7B,CAAA;AAEF,+DAA+D;AAC/D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEhE,oEAAoE;AACpE,eAAO,MAAM,iBAAiB;;;;;;CAAmC,CAAA;AACjE,gEAAgE;AAChE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;CAAwD,CAAA;AAEtF,2CAA2C;AAC3C,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAAG,WAAW,CAEvF;AAED,gDAAgD;AAChD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAIpF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { OffenseCode, RuleActivationState } from '../../../protocol-model/index.js';
|
|
2
|
+
import type { ChainParams } from './chainParams.js';
|
|
3
|
+
/** Whether reports naming an offense at a height may be recorded. */
|
|
4
|
+
export declare function isOffenseReportableAt(params: ChainParams, offense: OffenseCode, height: number): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Where an offense stands for adjudication at a height.
|
|
7
|
+
*
|
|
8
|
+
* Callers need the three-way answer rather than a boolean: inside the grace band a report is
|
|
9
|
+
* still verified and recorded, it simply cannot be confirmed against anyone.
|
|
10
|
+
*/
|
|
11
|
+
export declare function offenseAdjudicationStateAt(params: ChainParams, offense: OffenseCode, height: number): RuleActivationState;
|
|
12
|
+
/**
|
|
13
|
+
* The lowest protocol version a block at this height may declare, or undefined when nothing is
|
|
14
|
+
* required yet.
|
|
15
|
+
*
|
|
16
|
+
* The floor rides with the anchor rules, since that is the release the version stamp first has to
|
|
17
|
+
* mean something. Before then `block.protocol` is declared but unchecked, and rejecting on it
|
|
18
|
+
* would fail blocks that were valid when they were made.
|
|
19
|
+
* @param params The register version in force
|
|
20
|
+
* @param height The XL1 height being judged
|
|
21
|
+
* @returns The minimum protocol version, or undefined when unenforced
|
|
22
|
+
*/
|
|
23
|
+
export declare function protocolMinAt(params: ChainParams, height: number): number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Checks that a new register version may follow the one already published.
|
|
26
|
+
*
|
|
27
|
+
* The register is append-only over history: a version may add rules and move future heights, but
|
|
28
|
+
* never rewrite what was true at a height the chain has already passed. Without that, a rule
|
|
29
|
+
* could be made retroactive and blocks that were valid when produced would become offenses.
|
|
30
|
+
* @param previous The currently published version, when there is one
|
|
31
|
+
* @param next The version being published
|
|
32
|
+
* @param finalizedHeight The current finalized head height
|
|
33
|
+
* @returns The reasons the version may not be published, empty when it may
|
|
34
|
+
*/
|
|
35
|
+
export declare function chainParamsSuccessionErrors(previous: ChainParams | undefined, next: ChainParams, finalizedHeight: number): string[];
|
|
36
|
+
//# sourceMappingURL=chainParamsRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainParamsRules.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/chainParamsRules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EAAE,mBAAmB,EACjC,MAAM,iBAAiB,CAAA;AAKxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,qEAAqE;AACrE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAExG;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,GACb,mBAAmB,CAErB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAErF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,WAAW,GAAG,SAAS,EACjC,IAAI,EAAE,WAAW,EACjB,eAAe,EAAE,MAAM,GACtB,MAAM,EAAE,CAqBV"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export * from './chainContractManifest.js';
|
|
2
2
|
export * from './chainManifest.js';
|
|
3
|
+
export * from './chainParams.js';
|
|
4
|
+
export * from './chainParamsRules.js';
|
|
3
5
|
export * from './evmEventIndex.js';
|
|
4
6
|
export * from './indexManifest.js';
|
|
5
7
|
export * from './networkStakeRewardsIndex.js';
|
|
6
8
|
export * from './transactionInclusionIndex.js';
|
|
9
|
+
export * from './trustedPosture.js';
|
|
7
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { ChainId } from '../../../protocol-lib/index.js';
|
|
2
|
+
import type { ChainParams } from './chainParams.js';
|
|
3
|
+
/**
|
|
4
|
+
* Planning values for the decentralization parameters.
|
|
5
|
+
*
|
|
6
|
+
* These are the numbers the papers propose, not values any network is bound to. They are carried
|
|
7
|
+
* here so a register can be authored without inventing them, and so the one place they live is
|
|
8
|
+
* the one place a governance change edits.
|
|
9
|
+
*
|
|
10
|
+
* The stake amounts are deliberately absent: they are denominated in the staking token's smallest
|
|
11
|
+
* unit and are a governance decision per network, so a default would be a guess wearing a
|
|
12
|
+
* default's clothing.
|
|
13
|
+
*/
|
|
14
|
+
export declare const DEFAULT_CHAIN_PARAMS: {
|
|
15
|
+
attestationRewardBps: number;
|
|
16
|
+
bountyShareBps: number;
|
|
17
|
+
burnFloorBps: number;
|
|
18
|
+
catalogVersion: number;
|
|
19
|
+
challengeWindowEvmBlocks: number;
|
|
20
|
+
evidenceFreshnessEvmBlocks: number;
|
|
21
|
+
evidenceRetentionXl1Blocks: number;
|
|
22
|
+
executionDelayEvmBlocks: number;
|
|
23
|
+
freshnessBandEvmBlocks: number;
|
|
24
|
+
graceBandXl1Blocks: number;
|
|
25
|
+
maturityEvmBlocks: number;
|
|
26
|
+
minStakeAgeEvmBlocks: number;
|
|
27
|
+
opsAllowanceEvmBlocks: number;
|
|
28
|
+
protocolMin: number;
|
|
29
|
+
revealDelayEvmBlocks: number;
|
|
30
|
+
revealDelayXl1Blocks: number;
|
|
31
|
+
revealWindowEvmBlocks: number;
|
|
32
|
+
revealWindowXl1Blocks: number;
|
|
33
|
+
slashFractionsBps: {
|
|
34
|
+
equivocation: number;
|
|
35
|
+
'false-anchor': number;
|
|
36
|
+
'false-attestation': number;
|
|
37
|
+
'ineligible-production': number;
|
|
38
|
+
'invalid-block': number;
|
|
39
|
+
'invalid-slash-request': number;
|
|
40
|
+
'reward-overmint': number;
|
|
41
|
+
};
|
|
42
|
+
slashQuorumCount: number;
|
|
43
|
+
};
|
|
44
|
+
/** What a trusted-posture register needs beyond the planning defaults. */
|
|
45
|
+
export interface TrustedPostureConfig {
|
|
46
|
+
/** Address whose adjudication records would be honored, once any rule is on. */
|
|
47
|
+
arbiter: string;
|
|
48
|
+
/** Absolute bounty ceiling, in the smallest unit. */
|
|
49
|
+
bountyCapAtto?: string;
|
|
50
|
+
/** Chain these parameters govern. */
|
|
51
|
+
chainId: ChainId;
|
|
52
|
+
/** Minimum producer self-bond, in the smallest unit. */
|
|
53
|
+
minProducerSelfBondAtto?: string;
|
|
54
|
+
/** Minimum producer stake, in the smallest unit. */
|
|
55
|
+
minProducerStakeAtto?: string;
|
|
56
|
+
/** Minimum validator stake, in the smallest unit. */
|
|
57
|
+
minValidatorStakeAtto?: string;
|
|
58
|
+
/** Refundable reporter deposit, in the smallest unit. */
|
|
59
|
+
reporterDepositAtto?: string;
|
|
60
|
+
/** Where the allowed block reward comes from. */
|
|
61
|
+
rewardSource?: 'schedule' | 'contract';
|
|
62
|
+
/** Version number; the first published register is 1. */
|
|
63
|
+
version?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Builds a register describing a network that enforces nothing.
|
|
67
|
+
*
|
|
68
|
+
* This is the first version a network publishes, and it changes nothing about how that network
|
|
69
|
+
* behaves: no rule has an activation height, so every gate reads as inactive and the chain runs
|
|
70
|
+
* exactly as it did before the register existed. What it does provide is the control plane —
|
|
71
|
+
* somewhere for a later version to record an activation, and something for nodes to be reading
|
|
72
|
+
* long before the first rule turns on.
|
|
73
|
+
*
|
|
74
|
+
* The stake amounts default to zero because they are meaningless while nothing consumes them. A
|
|
75
|
+
* network that intends to enforce sets them in the version that first activates admission, when
|
|
76
|
+
* they have been sized against the value an offense could extract.
|
|
77
|
+
* @param config Chain identity and any amounts already decided
|
|
78
|
+
* @returns A register version with no activations
|
|
79
|
+
*/
|
|
80
|
+
export declare function createTrustedPostureParams(config: TrustedPostureConfig): ChainParams;
|
|
81
|
+
//# sourceMappingURL=trustedPosture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trustedPosture.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/trustedPosture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAGnD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BhC,CAAA;AAED,0EAA0E;AAC1E,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAA;IACf,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,qCAAqC;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,wDAAwD;IACxD,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,oDAAoD;IACpD,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,qDAAqD;IACrD,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,yDAAyD;IACzD,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iDAAiD;IACjD,YAAY,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;IACtC,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,oBAAoB,GAAG,WAAW,CAcpF"}
|
|
@@ -11,4 +11,11 @@ export declare const headPath: () => string;
|
|
|
11
11
|
* ancestors are sibling files under the same folder. `chainId` is normalized to lowercase.
|
|
12
12
|
*/
|
|
13
13
|
export declare const chainContractByIdPath: (chainId: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* One immutable version of the chain parameter register. Versions are never rewritten, so a
|
|
16
|
+
* reader that resolved one can keep using it.
|
|
17
|
+
*/
|
|
18
|
+
export declare const chainParamsVersionPath: (chainId: string, version: number) => string;
|
|
19
|
+
/** The mutable pointer naming the current register version for a chain. */
|
|
20
|
+
export declare const chainParamsHeadPath: (chainId: string) => string;
|
|
14
21
|
//# sourceMappingURL=chainState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chainState.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/chainState.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kFAAkF;AAClF,eAAO,MAAM,QAAQ,QAAO,MAA2B,CAAA;AAEvD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM,KAAG,MAAyD,CAAA"}
|
|
1
|
+
{"version":3,"file":"chainState.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/chainState.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kFAAkF;AAClF,eAAO,MAAM,QAAQ,QAAO,MAA2B,CAAA;AAEvD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM,KAAG,MAAyD,CAAA;AAEjH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,EAAE,SAAS,MAAM,KAAG,MAChB,CAAA;AAE1D,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,KAAG,MAA2D,CAAA"}
|
package/dist/neutral/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.d.ts
CHANGED
|
@@ -1,9 +1,43 @@
|
|
|
1
|
-
import type { Promisable } from '@ariestools/sdk';
|
|
1
|
+
import type { Hash, Promisable } from '@ariestools/sdk';
|
|
2
2
|
import type { Payload, WithHashMeta } from '@xyo-network/sdk';
|
|
3
|
-
import type { BaseContext, HydratedBlockWithHashMeta } from '../../../protocol-model/index.js';
|
|
3
|
+
import type { BaseContext, HydratedBlockWithHashMeta, RuleActivationParams, XL1BlockNumber } from '../../../protocol-model/index.js';
|
|
4
4
|
import type { InBlockPayloadValidationError } from './error.js';
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The register facts an in-block validator is allowed to ask about.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately a view rather than the register document: a validator needs to know which rules
|
|
9
|
+
* are on and the few numbers those rules quote, and widening this to the whole document would
|
|
10
|
+
* let block validity start depending on parameters nobody meant to make consensus-critical. A
|
|
11
|
+
* full register version satisfies this structurally, so no conversion is needed.
|
|
12
|
+
*/
|
|
13
|
+
export interface InBlockRuleParams extends RuleActivationParams {
|
|
14
|
+
/** Address whose adjudication records are honored. */
|
|
15
|
+
arbiter?: string;
|
|
16
|
+
/** Refundable deposit a report must escrow, in the smallest unit. */
|
|
17
|
+
reporterDepositAtto?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Context for InBlockPayloadValidationFunction operations.
|
|
21
|
+
*
|
|
22
|
+
* Both fields are optional because a node running the trusted posture wires neither, and the
|
|
23
|
+
* validators are written so that absence reproduces pre-upgrade behavior exactly.
|
|
24
|
+
*/
|
|
6
25
|
export interface InBlockPayloadValidationFunctionContext extends BaseContext {
|
|
26
|
+
/**
|
|
27
|
+
* Whether an evidence artifact was carried by an already-finalized block.
|
|
28
|
+
*
|
|
29
|
+
* Absent on a node that has not deployed the evidence subsystem. Validators gated on a rule
|
|
30
|
+
* that needs this must fail closed when it is missing: a node that cannot check a requirement
|
|
31
|
+
* cannot certify the block.
|
|
32
|
+
*/
|
|
33
|
+
hasFinalizedEvidenceArtifact?: (hash: Hash, height: XL1BlockNumber) => Promisable<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* The register version in force at a height.
|
|
36
|
+
*
|
|
37
|
+
* Absent when no register is wired, which is how a chain declares it is running exactly as it
|
|
38
|
+
* did before any of this existed.
|
|
39
|
+
*/
|
|
40
|
+
paramsAtHeight?: (height: XL1BlockNumber) => Promisable<InBlockRuleParams | undefined>;
|
|
7
41
|
}
|
|
8
42
|
/** Function type for InBlockPayloadValidation operations. */
|
|
9
43
|
export type InBlockPayloadValidationFunction = (context: InBlockPayloadValidationFunctionContext, payload: WithHashMeta<Payload>, block: HydratedBlockWithHashMeta) => Promisable<InBlockPayloadValidationError[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InBlockPayloadValidationFunction.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"InBlockPayloadValidationFunction.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE7D,OAAO,KAAK,EACV,WAAW,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,cAAc,EAC7E,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAA;AAE/D;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qEAAqE;IACrE,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,uCAAwC,SAAQ,WAAW;IAC1E;;;;;;OAMG;IACH,4BAA4B,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,KAAK,UAAU,CAAC,OAAO,CAAC,CAAA;IAC1F;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,UAAU,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAA;CACvF;AAED,6DAA6D;AAC7D,MAAM,MAAM,gCAAgC,GAAG,CAC7C,OAAO,EAAE,uCAAuC,EAChD,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,yBAAyB,KAC7D,UAAU,CAAC,6BAA6B,EAAE,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-lib/validation/payload/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,uCAAuC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-lib/validation/payload/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,uCAAuC,CAAA;AACrD,cAAc,eAAe,CAAA"}
|