@sig-net/midnight 0.24.0-rc.6 → 0.24.0-rc.9

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/README.md CHANGED
@@ -54,6 +54,7 @@ What your contract imports with `import "@sig-net/midnight/src/Signet"`:
54
54
  | Declare the protocol ledger state (setup step 3) | `SignBidirectionalEventMapV1` (the request map the MPC reads) and `SignetSigner` (the Signet singleton's cross-contract-call interface, pinned at deploy). |
55
55
  | Build and store a signature request (runtime step 1) | `constructSignBidirectionalEventV1` and `calculateEvmType2RequestIdV1`, over the request structs `EvmType2TxParams`, `EvmCalldata` and `EvmAccessListEntry`. The id hashes `calculateEvmType2TxParamsDigestV1`, a digest over the transaction's used entries only, so it ignores your struct's capacities and unused slots. |
56
56
  | Notify the MPC of the request (runtime step 1) | `constructSignBidirectionalEventNotificationV1`: packs your contract's address and the request map's ledger-tree path. |
57
+ | Narrow an attested `uint256` in-circuit | `checkedTruncationU128`: the `Bytes<32>` the MPC attests (little-endian) to a `Uint<128>`, aborting unless the high 16 bytes are zero (see [Output Recovery and Serialisation](https://github.com/sig-net/midnight-integration/blob/main/README.md#output-recovery-and-serialisation)). |
57
58
  | Build and read calldata words in-circuit | The builders `evmAddressAbiWord`, `numericAbiWord` and `boolAbiWord`, and the readers `abiWordToUint128` and `abiWordToBool` (see [EVM Type 2 transactions and ABI calldata words](https://github.com/sig-net/midnight-integration/blob/main/README.md#evm-type-2-transactions-and-abi-calldata-words)). |
58
59
  | Verify the execution attestation (runtime step 5) | `verifyRespondBidirectionalEventV1`: recomputes the attestation digest from the output bytes and the posted request id, output kind and block height, and checks the MPC's signature against your pinned response key. |
59
60
 
@@ -69,12 +70,13 @@ What clients import from `@sig-net/midnight`:
69
70
  | Derive the response key your deploy pins | `deriveMidnightResponseKey`: the key `initialise` stores (setup step 4), derived from your contract's address. |
70
71
  | Look up published counterparty values | `MidnightNetwork`, `getMpcRootPublicKey` and `getSignetContractAddress`: the fixed per-network values (see the notes in [Runtime](https://github.com/sig-net/midnight-integration/blob/main/README.md#runtime)). |
71
72
  | Accept an MPC public key in any published spelling | `parseSecp256k1PublicKey` (to a Compact `Secp256k1Point`) and `normaliseSecp256k1PublicKey` (to the canonical `0x04…` uncompressed SEC1 hex): both take SEC1 hex, compressed or uncompressed with an optional `0x`, and NEAR's `secp256k1:<base58>`. |
72
- | Read a text field of a request record | `asciiUnpadded`: the inverse of `asciiPadded`, for the zero-padded text fields (`executionDest`, the two schemas). |
73
+ | Read a text field of a request record | `asciiUnpadded`: the inverse of `asciiPadded`, for the zero-padded text fields (`executionDest`, `outputDeserializationSchema`). |
73
74
  | Compute a request id off chain | `calculateRequestId`: the TS twin of the on-chain circuit, plus `requestIdHex` and `parseRequestIdHex` for the hex form. |
74
75
  | Compose expected calldata words off chain (UIs, expected-record builders, tests) | The builders `numericAbiWord`, `evmAddressAbiWord` and `boolAbiWord`, and the readers `abiWordToUint128` and `abiWordToBool`: TS twins of the circuits under identical names. |
75
76
  | Digest a transaction decomposition off chain | `calculateEvmType2TxParamsDigest`: the TS twin of the circuit, what `calculateRequestId` hashes in place of the parameters. |
76
- | Rebuild the respond bytes the MPC attests for an executed EVM transaction | `executedEvmRespondOutput`: the request's two schemas, whether the transaction was a contract call (`isEvmContractCall` over its calldata) and its traced return data (`EvmTraceOutput`, read off a `debug_traceTransaction` callTracer frame by `evmTraceOutputFromCallFrame`) give the exact `serializedOutput` of steps 4 and 5, synthesised for a plain transfer or a void call. |
77
- | Convert a foreign execution output into respond bytes | `deserializeEvmOutput` (raw EVM return data to named values) and `serializeRespondOutput` (named values to the packed respond payload): the two conversions `executedEvmRespondOutput` runs on a contract call's return data. |
77
+ | Rebuild the respond bytes the MPC attests for an executed EVM transaction | `executedEvmRespondOutput`: the request's `outputDeserializationSchema`, whether the transaction was a contract call (`isEvmContractCall` over its calldata) and its traced return data (`EvmTraceOutput`, read off a `debug_traceTransaction` callTracer frame by `evmTraceOutputFromCallFrame`) give the exact `serializedOutput` of steps 4 and 5, empty for an empty output schema. |
78
+ | Convert a foreign execution output into respond bytes | `deserializeEvmOutput` (raw EVM return data to named values) and `serializeRespondOutput` (named values to the attested Borsh bytes): the two conversions `executedEvmRespondOutput` runs on a contract call's return data. |
79
+ | Know what an output schema attests to | `deriveRespondSchema` (the Borsh struct the MPC serialises with), `respondOutputWidth` (the `Bytes<N>` width a settle circuit declares) and `unsupportedEvmOutputFields` (the fields that make the MPC drop a request, without throwing). |
78
80
  | Recognise a failed remote execution | `OutputKind` on the verified `RespondBidirectionalEvent`: `failed` or `unviable` beside an empty output (see [Handling Failure](https://github.com/sig-net/midnight-integration/blob/main/README.md#handling-failure)). |
79
81
  | Read the attested output bytes from the MPC's output cache | `MpcOutputCacheReader`: one reader per network and Signet singleton pair, over the public bucket an MPC configured with output storage writes each request's exact attested bytes to before posting, defaulting to the bucket `getMpcOutputCacheUrl` publishes for the network. `fetchSerializedOutput` yields the bytes step 5 verifies, `undefined` while the object is not written yet. |
80
82
  | Hand a verified attestation to your verify circuit (runtime step 5) | `respondBidirectionalEventToCircuitInput`: flips the wire event's big-endian `bigR.x` and `s` into the little-endian record `verifyRespondBidirectionalEventV1` reads. |
@@ -130,3 +132,20 @@ the same tags and field order as the circuits.
130
132
  `constructSignBidirectionalEventV1` rejects a `signatureDest` other than
131
133
  `MPCDestination.unused` and any non-zero byte in `params`. Both fields
132
134
  are reserved and remain outside the request id.
135
+
136
+ ## EVM output and Borsh responses
137
+
138
+ `outputDeserializationSchema` is an ethers-compatible ABI field array, and it is the only schema a request carries: `respondSerializationSchema` is reserved, pinned to `Bytes<0>` by `constructSignBidirectionalEventV1`. The MPC derives the Borsh schema of the attested bytes from the output schema, one struct member per field in schema order, under a closed mapping:
139
+
140
+ | ABI type | Borsh | Compact | Width |
141
+ | --- | --- | --- | --- |
142
+ | `bool` | `bool` | `Boolean` | 1 |
143
+ | `uint256` | `[u8; 32]`, little-endian | `Bytes<32>`, narrowed in-circuit with `checkedTruncationU128` | 32 |
144
+ | `address` | `[u8; 20]` | `Bytes<20>` | 20 |
145
+ | `bytes1` to `bytes32` | `[u8; N]` | `Bytes<N>` | N |
146
+
147
+ Every other ABI type is unsupported. `unsupportedEvmOutputFields` names the offending fields without throwing (the MPC drops such a request), and `deriveRespondSchema`, `respondOutputWidth` and `serializeRespondOutput` throw on them. For example, `[{"name":"success","type":"bool"},{"name":"amount","type":"uint256"}]` derives `{"struct":{"success":"bool","amount":{"array":{"type":"u8","len":32}}}}`, 33 bytes.
148
+
149
+ `serializeRespondOutput` converts the decoded values (ethers' bigint, boolean and hex forms, plus plain numbers and decimal strings for `uint256`) into that struct and calls `@sig-net/midnight-serde`. A `uint256` is carried whole as 32 little-endian bytes, the byte order of every Borsh and Compact integer and the ABI wire word reversed: nothing is narrowed off chain, and a value outside `0 <= v < 2^256` is rejected. `executedEvmRespondOutput` requires the output schema and the return data to agree: an empty schema with no return data (a plain transfer, or a call that returned nothing) attests an EMPTY output, a non-empty schema with return data runs the two conversions, and either mismatch throws. The schema's types are checked on every path, a plain transfer included.
150
+
151
+ Output schema JSON accepts text or UTF-8 bytes and trims NUL padding in either form. Blank text is the empty schema, and malformed JSON fails with schema context.
@@ -1,46 +1,23 @@
1
+ import { type Schema } from "@sig-net/midnight-serde";
1
2
  import { ethers } from "ethers";
2
- /** Fixed-width schema types: the byte size follows entirely from the type. */
3
- export type AbiFixedType = "bool" | "address" | "field" | `uint${number}` | `bytes${number}`;
4
- /** A fixed-width schema field: its byte size follows entirely from its type. */
5
- export interface AbiFixedField {
6
- name: string;
7
- type: AbiFixedType;
8
- }
9
- /** A dynamic string/bytes field. `maxBytes` is the fixed Compact buffer capacity. */
10
- export interface AbiDynamicField {
11
- name: string;
12
- type: "string" | "bytes";
13
- maxBytes: number;
14
- }
15
- /** A dynamic array field. `maxItems` is the fixed Compact vector capacity. */
16
- export interface AbiArrayField {
17
- name: string;
18
- type: `${AbiFixedType}[]`;
19
- maxItems: number;
20
- }
21
- /** One respond-schema field: fixed-width, dynamic string/bytes, or array. */
22
- export type AbiSchemaField = AbiFixedField | AbiDynamicField | AbiArrayField;
23
- /** An ABI-style schema exactly as carried on chain (JSON array of fields). */
24
- export type AbiSchema = AbiSchemaField[];
25
- /** Any form a respond schema arrives in: parsed, JSON text, or NUL-padded raw bytes. */
26
- export type AbiSchemaInput = AbiSchema | string | Uint8Array;
27
3
  /**
28
- * A decode-side schema field: `type` is ANY type string the ABI library
29
- * accepts. The restricted {@link AbiSchemaField} vocabulary is a respond-side
30
- * concern only, and is assignable to this shape.
4
+ * One field of an outputDeserializationSchema: `type` is ANY type string the
5
+ * ABI library accepts. {@link deserializeEvmOutput} decodes every ABI type,
6
+ * while the respond side ({@link deriveRespondSchema}) accepts only the
7
+ * {@link EvmOutputTypeKind} subset.
31
8
  */
32
9
  export interface EvmSchemaField {
33
10
  name: string;
34
11
  type: string;
35
12
  }
36
- /** Any form a decode schema arrives in: parsed, JSON text, or NUL-padded raw bytes. */
13
+ /** Any form an outputDeserializationSchema arrives in: parsed, JSON text, or NUL-padded raw bytes. */
37
14
  export type EvmSchemaInput = readonly EvmSchemaField[] | string | Uint8Array;
38
15
  /**
39
16
  * Decoded output values, keyed by schema field name. Numerics are bigint,
40
17
  * bools boolean, address/bytesN/bytes/string are the forms ethers produces
41
18
  * (hex or text strings) or Uint8Array, arrays are plain arrays.
42
- * `serializeRespondOutput` accepts all of these (plus plain numbers and
43
- * numeric strings, the forms indexer JSON typically yields).
19
+ * {@link serializeRespondOutput} additionally accepts plain numbers and
20
+ * numeric strings for `uint256`, the forms indexer JSON typically yields.
44
21
  */
45
22
  export type AbiDecodedValue = bigint | boolean | number | string | Uint8Array | AbiDecodedValue[];
46
23
  /** Decoded output values keyed by schema field name (see {@link AbiDecodedValue}). */
@@ -50,10 +27,10 @@ export type AbiDecodedOutput = Record<string, AbiDecodedValue>;
50
27
  * into named values, driven by the request's outputDeserializationSchema.
51
28
  * The decode-side counterpart of {@link serializeRespondOutput}. Type
52
29
  * validation is FULLY delegated to ethers: this function checks the schema's
53
- * shape only. An empty schema decodes to an empty object. The MPC never
54
- * decodes under an empty schema: {@link executedEvmRespondOutput} carries
55
- * its rule for that case. Returns a plain object (never an ethers
56
- * `Result`), so it survives JSON round-trips and structural comparison.
30
+ * shape only, so it decodes ABI types the respond side refuses. An empty
31
+ * schema decodes to an empty object. Returns a plain object (never an
32
+ * ethers `Result`), so it survives JSON round-trips and structural
33
+ * comparison.
57
34
  *
58
35
  * @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
59
36
  * @param callResult - The ABI-encoded return data (hex string or bytes).
@@ -61,33 +38,77 @@ export type AbiDecodedOutput = Record<string, AbiDecodedValue>;
61
38
  */
62
39
  export declare function deserializeEvmOutput(schema: EvmSchemaInput, callResult: ethers.BytesLike): AbiDecodedOutput;
63
40
  /**
64
- * Ceiling on a respond schema's total packed byte width. Schemas are
65
- * requester-authored on-chain data, so unbounded maxBytes/maxItems would let
66
- * a hostile request demand giant allocations from the responder. A real
67
- * respond payload must fit its consumer contract's fixed `deserialize<T, N>`
68
- * width, orders of magnitude below this.
41
+ * The ABI output types the MPC attests, and what each maps to. The respond
42
+ * bytes are the Borsh serialisation of a struct with one member per output
43
+ * field, in schema order, typed by this mapping:
44
+ *
45
+ * - {@link EvmOutputTypeKind.Bool}: ABI `bool`, Borsh `bool`, Compact `Boolean` (1 byte).
46
+ * - {@link EvmOutputTypeKind.Uint256}: ABI `uint256`, Borsh `[u8; 32]`
47
+ * holding the value LITTLE-endian, the byte order of every Borsh and
48
+ * Compact integer, Compact `Bytes<32>` (32 bytes). A circuit that wants a
49
+ * number narrows it with `checkedTruncationU128`, which aborts above
50
+ * 2^128 - 1. The ABI wire word is big-endian: the MPC reverses it once,
51
+ * here, so no circuit has to.
52
+ * - {@link EvmOutputTypeKind.Address}: ABI `address`, Borsh `[u8; 20]`
53
+ * holding the address bytes, Compact `Bytes<20>` (20 bytes).
54
+ * - {@link EvmOutputTypeKind.FixedBytes}: ABI `bytes1` to `bytes32`, Borsh
55
+ * `[u8; N]`, Compact `Bytes<N>` (N bytes).
56
+ *
57
+ * Every other ABI type is unsupported: the MPC drops a request whose output
58
+ * schema names one, and {@link deriveRespondSchema} throws on it.
59
+ */
60
+ export declare enum EvmOutputTypeKind {
61
+ Bool = "bool",
62
+ Uint256 = "uint256",
63
+ Address = "address",
64
+ FixedBytes = "bytesN"
65
+ }
66
+ /**
67
+ * The fields of an outputDeserializationSchema whose ABI type is outside the
68
+ * supported subset ({@link EvmOutputTypeKind}). The check itself never
69
+ * throws on an unsupported type: an empty result means the MPC attests the
70
+ * request, a non-empty one means it drops it.
71
+ *
72
+ * @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
73
+ * @returns The unsupported fields in schema order, empty when every field is supported.
74
+ * @throws {Error} If the schema is not an array of uniquely named fields (its shape, not its types).
75
+ */
76
+ export declare function unsupportedEvmOutputFields(schema: EvmSchemaInput): EvmSchemaField[];
77
+ /**
78
+ * The Borsh schema the respond bytes of an executed call are serialised
79
+ * with: a struct with one member per output field, in schema order, each
80
+ * typed by {@link EvmOutputTypeKind}. An empty output schema derives an
81
+ * empty struct, which serialises to zero bytes.
82
+ *
83
+ * @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
84
+ * @returns The derived Borsh struct schema.
85
+ * @throws {Error} If the schema is malformed or names an unsupported ABI type.
69
86
  */
70
- export declare const MAX_RESPOND_PACKED_BYTES = 65536;
87
+ export declare function deriveRespondSchema(schema: EvmSchemaInput): Schema;
71
88
  /**
72
- * Encode decoded output values into the respond payload, driven by the
73
- * request's respondSerializationSchema: the bytes a consumer contract reads
74
- * with `deserialize<T, N>` and the MPC attests. The respond-side counterpart
75
- * of {@link deserializeEvmOutput}.
89
+ * The byte width of the respond bytes an output schema derives: the sum of
90
+ * its fields' widths under {@link EvmOutputTypeKind}, what a settle circuit
91
+ * declares as its `Bytes<N>` output argument.
76
92
  *
77
- * The result is the PACKED value, unpadded and unbounded: its length follows
78
- * entirely from the schema, and padding to a fixed container width is the
79
- * caller's concern. Strict: values are range-checked, dynamic payloads must
80
- * fit their capacity with no silent truncation, and signed integer types are
81
- * rejected.
93
+ * @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
94
+ * @returns The exact serialised width, 0 for an empty schema.
95
+ * @throws {Error} If the schema is malformed or names an unsupported ABI type.
96
+ */
97
+ export declare function respondOutputWidth(schema: EvmSchemaInput): number;
98
+ /**
99
+ * Serialise ABI-decoded output into the respond bytes the MPC attests: the
100
+ * Borsh encoding of {@link deriveRespondSchema}'s struct over the output's
101
+ * values. A `uint256` is carried whole as 32 little-endian bytes, so no
102
+ * value is narrowed off chain: a circuit that wants a number narrows the
103
+ * `Bytes<32>` with `checkedTruncationU128`.
82
104
  *
83
- * @param schema - The respondSerializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
84
- * @param output - Decoded values keyed by field name (from {@link deserializeEvmOutput} or any source using the same forms).
85
- * @returns The packed respond bytes.
86
- * @throws {Error} If the schema is empty or malformed, packs to more than
87
- * {@link MAX_RESPOND_PACKED_BYTES} bytes, a value falls outside its declared
88
- * range, or a dynamic payload exceeds its capacity.
105
+ * @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
106
+ * @param output - The decoded values keyed by field name, as {@link deserializeEvmOutput} returns them.
107
+ * @returns The unpadded respond bytes, {@link respondOutputWidth} long.
108
+ * @throws {Error} If the schema is malformed or names an unsupported type, a
109
+ * field is missing from `output`, or a value is outside its type.
89
110
  */
90
- export declare function serializeRespondOutput(schema: AbiSchemaInput, output: AbiDecodedOutput): Uint8Array;
111
+ export declare function serializeRespondOutput(schema: EvmSchemaInput, output: AbiDecodedOutput): Uint8Array;
91
112
  /**
92
113
  * Whether an EVM transaction is a contract call, decided over its input
93
114
  * bytes exactly as the MPC decides it (`is_contract_call` in its
@@ -137,48 +158,38 @@ export type EvmTraceOutput = {
137
158
  readonly kind: EvmTraceOutputKind.NotTraced;
138
159
  };
139
160
  /**
140
- * A request's two respond-path schemas, each in any form its conversion
141
- * accepts. An on-ledger request record (`SignBidirectionalEvent`) satisfies
142
- * it, as does the pair read off one as JSON text.
143
- */
144
- export interface RespondPathSchemas {
145
- /** The outputDeserializationSchema, which {@link deserializeEvmOutput} decodes the return data with. */
146
- readonly outputDeserializationSchema: EvmSchemaInput;
147
- /** The respondSerializationSchema, which {@link serializeRespondOutput} packs the respond bytes with. */
148
- readonly respondSerializationSchema: AbiSchemaInput;
149
- }
150
- /**
151
- * The exact serialised respond output the MPC attests for an EVM transaction
152
- * that executed (the payload of an `OutputKind.executed` attestation),
153
- * mirroring the MPC's `build_serialized_output` under the Midnight respond
154
- * format:
161
+ * The exact respond output the MPC attests for an EVM transaction that
162
+ * executed (the payload of an `OutputKind.executed` attestation), derived
163
+ * from the request's outputDeserializationSchema alone. The schema and the
164
+ * execution's return data MUST agree: an empty schema declares that the
165
+ * execution returns nothing, a non-empty schema that it returns data.
155
166
  *
156
- * - Not a contract call: the output schema and the trace are ignored, and
157
- * the respond fields get synthesised defaults (bool `true`, string
158
- * `"non_function_call_success"` in its `maxBytes` buffer, any other kind
159
- * throws).
160
- * - A contract call under an EMPTY output schema (a void call): the same
161
- * defaults when the trace has no or empty return data, a throw when it
162
- * returned data.
163
- * - A contract call under a non-empty output schema: the return data
164
- * decoded by {@link deserializeEvmOutput} and packed by
165
- * {@link serializeRespondOutput}, a throw when the trace has no return
166
- * data.
167
+ * - Not a contract call (a plain transfer): there is no return data, so the
168
+ * schema must be empty and the output is EMPTY.
169
+ * - A contract call whose trace carries no return data, or empty return
170
+ * data (`0x`): the schema must be empty and the output is EMPTY.
171
+ * - A contract call that returned data: the schema must be non-empty, and
172
+ * the output is the return data decoded by {@link deserializeEvmOutput}
173
+ * and serialised by {@link serializeRespondOutput}.
167
174
  *
168
- * A contract call that was not traced always throws. A failed or unviable
169
- * execution is attested over an empty output instead, which needs no call.
175
+ * The schema's types are checked on every path, a plain transfer included,
176
+ * so a request the MPC should have dropped never attests anything. A failed
177
+ * or unviable execution is attested over an empty output instead, which
178
+ * needs no call. An empty output under `executed` is therefore ordinary for
179
+ * an empty schema: its settle circuit verifies at width 0 and must route on
180
+ * the verified `outputKind`, never on the width.
170
181
  *
171
- * @param schemas - The request's two schemas (a request record satisfies this).
182
+ * @param schema - The request's outputDeserializationSchema (a request record's field satisfies this).
172
183
  * @param isContractCall - Whether the transaction is a contract call, as {@link isEvmContractCall} decides it.
173
184
  * @param trace - The transaction's traced return data (`NotTraced` for an untraced plain transfer).
174
- * @returns The packed respond bytes, unpadded.
185
+ * @returns The respond bytes, unpadded, empty for an empty schema.
175
186
  * @throws {Error} Exactly where the MPC refuses to attest an execution: a
176
- * contract call not traced, an empty output schema with return data, a
177
- * non-empty output schema with no or undecodable return data, a malformed
178
- * output schema on a contract call, a respond field without a synthesised
179
- * default, and every {@link serializeRespondOutput} rejection.
187
+ * malformed schema or an unsupported output type, a contract call not
188
+ * traced, return data under an empty schema, no or empty return data
189
+ * under a non-empty schema, return data the schema cannot decode, and
190
+ * every {@link serializeRespondOutput} rejection.
180
191
  */
181
- export declare function executedEvmRespondOutput(schemas: RespondPathSchemas, isContractCall: boolean, trace: EvmTraceOutput): Uint8Array;
192
+ export declare function executedEvmRespondOutput(schema: EvmSchemaInput, isContractCall: boolean, trace: EvmTraceOutput): Uint8Array;
182
193
  /** A parsed JSON object. */
183
194
  export interface JsonObject {
184
195
  readonly [key: string]: JsonValue;
@@ -1 +1 @@
1
- {"version":3,"file":"abi-serde.d.ts","sourceRoot":"","sources":["../src/abi-serde.ts"],"names":[],"mappings":"AA+DA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMhC,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,MAAM,EAAE,GAAG,QAAQ,MAAM,EAAE,CAAC;AAE7F,g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