@proto-kit/protocol 0.1.1-develop.1316 → 0.1.1-develop.1347
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/hooks/AccountStateHook.d.ts +3 -3
- package/dist/hooks/AccountStateHook.d.ts.map +1 -1
- package/dist/hooks/AccountStateHook.js +6 -2
- package/dist/hooks/AccountStateHook.js.map +1 -1
- package/dist/hooks/LastStateRootBlockHook.d.ts +3 -4
- package/dist/hooks/LastStateRootBlockHook.d.ts.map +1 -1
- package/dist/hooks/LastStateRootBlockHook.js +4 -4
- package/dist/hooks/LastStateRootBlockHook.js.map +1 -1
- package/dist/hooks/NoopBlockHook.d.ts +3 -4
- package/dist/hooks/NoopBlockHook.d.ts.map +1 -1
- package/dist/hooks/NoopBlockHook.js +1 -1
- package/dist/hooks/NoopBlockHook.js.map +1 -1
- package/dist/hooks/NoopTransactionHook.d.ts +2 -2
- package/dist/hooks/NoopTransactionHook.d.ts.map +1 -1
- package/dist/hooks/NoopTransactionHook.js +4 -1
- package/dist/hooks/NoopTransactionHook.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/model/AppliedStateTransitionBatch.d.ts +114 -0
- package/dist/model/AppliedStateTransitionBatch.d.ts.map +1 -0
- package/dist/model/AppliedStateTransitionBatch.js +16 -0
- package/dist/model/AppliedStateTransitionBatch.js.map +1 -0
- package/dist/model/StateTransition.d.ts +1 -0
- package/dist/model/StateTransition.d.ts.map +1 -1
- package/dist/model/StateTransition.js +5 -0
- package/dist/model/StateTransition.js.map +1 -1
- package/dist/model/StateTransitionProvableBatch.d.ts +249 -97
- package/dist/model/StateTransitionProvableBatch.d.ts.map +1 -1
- package/dist/model/StateTransitionProvableBatch.js +72 -65
- package/dist/model/StateTransitionProvableBatch.js.map +1 -1
- package/dist/model/transaction/RuntimeTransaction.d.ts +1 -0
- package/dist/model/transaction/RuntimeTransaction.d.ts.map +1 -1
- package/dist/model/transaction/RuntimeTransaction.js +3 -0
- package/dist/model/transaction/RuntimeTransaction.js.map +1 -1
- package/dist/protocol/ProvableBlockHook.d.ts +13 -3
- package/dist/protocol/ProvableBlockHook.d.ts.map +1 -1
- package/dist/protocol/ProvableBlockHook.js +16 -0
- package/dist/protocol/ProvableBlockHook.js.map +1 -1
- package/dist/protocol/ProvableTransactionHook.d.ts +29 -2
- package/dist/protocol/ProvableTransactionHook.d.ts.map +1 -1
- package/dist/protocol/ProvableTransactionHook.js +9 -0
- package/dist/protocol/ProvableTransactionHook.js.map +1 -1
- package/dist/prover/accumulators/AppliedBatchHashList.d.ts +18 -0
- package/dist/prover/accumulators/AppliedBatchHashList.d.ts.map +1 -0
- package/dist/prover/accumulators/AppliedBatchHashList.js +25 -0
- package/dist/prover/accumulators/AppliedBatchHashList.js.map +1 -0
- package/dist/{utils → prover/accumulators}/StateTransitionReductionList.d.ts +3 -2
- package/dist/prover/accumulators/StateTransitionReductionList.d.ts.map +1 -0
- package/dist/{utils → prover/accumulators}/StateTransitionReductionList.js +6 -3
- package/dist/prover/accumulators/StateTransitionReductionList.js.map +1 -0
- package/dist/prover/accumulators/TransactionHashList.d.ts +6 -0
- package/dist/prover/accumulators/TransactionHashList.d.ts.map +1 -0
- package/dist/prover/accumulators/TransactionHashList.js +8 -0
- package/dist/prover/accumulators/TransactionHashList.js.map +1 -0
- package/dist/prover/accumulators/WitnessedRootHashList.d.ts +137 -0
- package/dist/prover/accumulators/WitnessedRootHashList.d.ts.map +1 -0
- package/dist/prover/accumulators/WitnessedRootHashList.js +50 -0
- package/dist/prover/accumulators/WitnessedRootHashList.js.map +1 -0
- package/dist/prover/block/BlockProvable.d.ts +579 -35
- package/dist/prover/block/BlockProvable.d.ts.map +1 -1
- package/dist/prover/block/BlockProvable.js +55 -3
- package/dist/prover/block/BlockProvable.js.map +1 -1
- package/dist/prover/block/BlockProver.d.ts +52 -50
- package/dist/prover/block/BlockProver.d.ts.map +1 -1
- package/dist/prover/block/BlockProver.js +289 -209
- package/dist/prover/block/BlockProver.js.map +1 -1
- package/dist/prover/block/accummulators/BlockHashMerkleTree.d.ts +55 -13
- package/dist/prover/block/accummulators/BlockHashMerkleTree.d.ts.map +1 -1
- package/dist/prover/block/accummulators/BlockHashMerkleTree.js +11 -3
- package/dist/prover/block/accummulators/BlockHashMerkleTree.js.map +1 -1
- package/dist/prover/statetransition/StateTransitionProvable.d.ts +107 -106
- package/dist/prover/statetransition/StateTransitionProvable.d.ts.map +1 -1
- package/dist/prover/statetransition/StateTransitionProvable.js +8 -8
- package/dist/prover/statetransition/StateTransitionProvable.js.map +1 -1
- package/dist/prover/statetransition/StateTransitionProver.d.ts +14 -11
- package/dist/prover/statetransition/StateTransitionProver.d.ts.map +1 -1
- package/dist/prover/statetransition/StateTransitionProver.js +116 -62
- package/dist/prover/statetransition/StateTransitionProver.js.map +1 -1
- package/dist/settlement/contracts/DispatchContractProtocolModule.d.ts +1 -1
- package/dist/settlement/contracts/DispatchSmartContract.d.ts +1 -1
- package/dist/settlement/contracts/SettlementSmartContract.d.ts.map +1 -1
- package/dist/settlement/contracts/SettlementSmartContract.js +1 -0
- package/dist/settlement/contracts/SettlementSmartContract.js.map +1 -1
- package/dist/state/assert/assert.d.ts.map +1 -1
- package/dist/state/assert/assert.js +5 -3
- package/dist/state/assert/assert.js.map +1 -1
- package/dist/state/context/RuntimeMethodExecutionContext.d.ts +3 -3
- package/dist/state/context/RuntimeMethodExecutionContext.d.ts.map +1 -1
- package/dist/state/context/RuntimeMethodExecutionContext.js +7 -4
- package/dist/state/context/RuntimeMethodExecutionContext.js.map +1 -1
- package/dist/utils/FieldOptions.d.ts +62 -0
- package/dist/utils/FieldOptions.d.ts.map +1 -0
- package/dist/utils/FieldOptions.js +13 -0
- package/dist/utils/FieldOptions.js.map +1 -0
- package/dist/utils/ProvableHashList.d.ts +21 -2
- package/dist/utils/ProvableHashList.d.ts.map +1 -1
- package/dist/utils/ProvableHashList.js +37 -2
- package/dist/utils/ProvableHashList.js.map +1 -1
- package/dist/utils/ProvableReductionHashList.d.ts +7 -3
- package/dist/utils/ProvableReductionHashList.d.ts.map +1 -1
- package/dist/utils/ProvableReductionHashList.js +8 -5
- package/dist/utils/ProvableReductionHashList.js.map +1 -1
- package/dist/utils/utils.d.ts +10 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +6 -0
- package/dist/utils/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/hooks/AccountStateHook.ts +12 -3
- package/src/hooks/LastStateRootBlockHook.ts +7 -8
- package/src/hooks/NoopBlockHook.ts +7 -4
- package/src/hooks/NoopTransactionHook.ts +5 -2
- package/src/index.ts +6 -1
- package/src/model/AppliedStateTransitionBatch.ts +16 -0
- package/src/model/StateTransition.ts +6 -0
- package/src/model/StateTransitionProvableBatch.ts +94 -105
- package/src/model/transaction/RuntimeTransaction.ts +4 -0
- package/src/protocol/ProvableBlockHook.ts +51 -3
- package/src/protocol/ProvableTransactionHook.ts +67 -3
- package/src/prover/accumulators/AppliedBatchHashList.ts +32 -0
- package/src/{utils → prover/accumulators}/StateTransitionReductionList.ts +7 -4
- package/src/prover/accumulators/TransactionHashList.ts +9 -0
- package/src/prover/accumulators/WitnessedRootHashList.ts +61 -0
- package/src/prover/block/BlockProvable.ts +128 -9
- package/src/prover/block/BlockProver.ts +531 -383
- package/src/prover/block/accummulators/BlockHashMerkleTree.ts +11 -3
- package/src/prover/statetransition/StateTransitionProvable.ts +17 -11
- package/src/prover/statetransition/StateTransitionProver.ts +219 -144
- package/src/settlement/contracts/SettlementSmartContract.ts +4 -0
- package/src/state/assert/assert.ts +6 -3
- package/src/state/context/RuntimeMethodExecutionContext.ts +15 -7
- package/src/utils/FieldOptions.ts +13 -0
- package/src/utils/ProvableHashList.ts +77 -2
- package/src/utils/ProvableReductionHashList.ts +12 -3
- package/src/utils/utils.ts +18 -1
- package/test/BlockProver.test.ts +2 -0
- package/test/TestingProtocol.ts +5 -0
- package/test/model/StateTransitionProvableBatch.test.ts +137 -0
- package/test/prover/block/BlockProver.test.ts +18 -0
- package/test/prover/statetransition/StateTransitionProver.test.ts +240 -0
- package/test/utils/ProvableHashList.test.ts +44 -0
- package/test/utils/ProvableReductionHashList.test.ts +1 -1
- package/dist/utils/StateTransitionReductionList.d.ts.map +0 -1
- package/dist/utils/StateTransitionReductionList.js.map +0 -1
|
@@ -2,73 +2,131 @@ import { Bool } from "o1js";
|
|
|
2
2
|
import { RollupMerkleTreeWitness } from "@proto-kit/common";
|
|
3
3
|
import { ProvableStateTransition } from "./StateTransition.js";
|
|
4
4
|
export declare class StateTransitionType {
|
|
5
|
-
static readonly
|
|
6
|
-
static readonly
|
|
7
|
-
static
|
|
8
|
-
static isProtocol(type: boolean): boolean;
|
|
5
|
+
static readonly nothing = 2;
|
|
6
|
+
static readonly closeAndApply = 1;
|
|
7
|
+
static readonly closeAndThrowAway = 0;
|
|
9
8
|
}
|
|
10
9
|
declare const ProvableStateTransitionType_base: (new (value: {
|
|
11
|
-
type: import("o1js/dist/node/lib/provable/
|
|
10
|
+
type: import("o1js/dist/node/lib/provable/field").Field;
|
|
12
11
|
}) => {
|
|
13
|
-
type: import("o1js/dist/node/lib/provable/
|
|
12
|
+
type: import("o1js/dist/node/lib/provable/field").Field;
|
|
14
13
|
}) & {
|
|
15
14
|
_isStruct: true;
|
|
16
15
|
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf").Provable<{
|
|
17
|
-
type: import("o1js/dist/node/lib/provable/
|
|
16
|
+
type: import("o1js/dist/node/lib/provable/field").Field;
|
|
18
17
|
}, {
|
|
19
|
-
type:
|
|
18
|
+
type: bigint;
|
|
20
19
|
}>, "fromFields"> & {
|
|
21
20
|
fromFields: (fields: import("o1js/dist/node/lib/provable/field").Field[]) => {
|
|
22
|
-
type: import("o1js/dist/node/lib/provable/
|
|
21
|
+
type: import("o1js/dist/node/lib/provable/field").Field;
|
|
23
22
|
};
|
|
24
23
|
} & {
|
|
25
24
|
fromValue: (value: {
|
|
26
|
-
type:
|
|
25
|
+
type: string | number | bigint | import("o1js/dist/node/lib/provable/field").Field;
|
|
27
26
|
}) => {
|
|
28
|
-
type: import("o1js/dist/node/lib/provable/
|
|
27
|
+
type: import("o1js/dist/node/lib/provable/field").Field;
|
|
29
28
|
};
|
|
30
29
|
toInput: (x: {
|
|
31
|
-
type: import("o1js/dist/node/lib/provable/
|
|
30
|
+
type: import("o1js/dist/node/lib/provable/field").Field;
|
|
32
31
|
}) => {
|
|
33
32
|
fields?: import("o1js/dist/node/lib/provable/field").Field[] | undefined;
|
|
34
33
|
packed?: [import("o1js/dist/node/lib/provable/field").Field, number][] | undefined;
|
|
35
34
|
};
|
|
36
35
|
toJSON: (x: {
|
|
37
|
-
type: import("o1js/dist/node/lib/provable/
|
|
36
|
+
type: import("o1js/dist/node/lib/provable/field").Field;
|
|
38
37
|
}) => {
|
|
39
|
-
type:
|
|
38
|
+
type: string;
|
|
40
39
|
};
|
|
41
40
|
fromJSON: (x: {
|
|
42
|
-
type:
|
|
41
|
+
type: string;
|
|
43
42
|
}) => {
|
|
44
|
-
type: import("o1js/dist/node/lib/provable/
|
|
43
|
+
type: import("o1js/dist/node/lib/provable/field").Field;
|
|
45
44
|
};
|
|
46
45
|
empty: () => {
|
|
47
|
-
type: import("o1js/dist/node/lib/provable/
|
|
46
|
+
type: import("o1js/dist/node/lib/provable/field").Field;
|
|
48
47
|
};
|
|
49
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* STType is encoding both the type and whether it should be accumulated or not in one field
|
|
51
|
+
*/
|
|
50
52
|
export declare class ProvableStateTransitionType extends ProvableStateTransitionType_base {
|
|
51
|
-
static get
|
|
52
|
-
static get
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
static get nothing(): ProvableStateTransitionType;
|
|
54
|
+
static get closeAndApply(): ProvableStateTransitionType;
|
|
55
|
+
static get closeAndThrowAway(): ProvableStateTransitionType;
|
|
56
|
+
private static from;
|
|
57
|
+
isClosing(): import("o1js/dist/node/lib/provable/bool").Bool;
|
|
58
|
+
isNothing(): import("o1js/dist/node/lib/provable/bool").Bool;
|
|
55
59
|
}
|
|
56
|
-
declare const
|
|
57
|
-
|
|
58
|
-
transitionTypes: ProvableStateTransitionType[];
|
|
59
|
-
merkleWitnesses: RollupMerkleTreeWitness[];
|
|
60
|
+
declare const MerkleWitnessBatch_base: (new (value: {
|
|
61
|
+
witnesses: RollupMerkleTreeWitness[];
|
|
60
62
|
}) => {
|
|
61
|
-
|
|
62
|
-
transitionTypes: ProvableStateTransitionType[];
|
|
63
|
-
merkleWitnesses: RollupMerkleTreeWitness[];
|
|
63
|
+
witnesses: RollupMerkleTreeWitness[];
|
|
64
64
|
}) & {
|
|
65
65
|
_isStruct: true;
|
|
66
66
|
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf").Provable<{
|
|
67
|
-
|
|
68
|
-
transitionTypes: ProvableStateTransitionType[];
|
|
69
|
-
merkleWitnesses: RollupMerkleTreeWitness[];
|
|
67
|
+
witnesses: RollupMerkleTreeWitness[];
|
|
70
68
|
}, {
|
|
71
|
-
|
|
69
|
+
witnesses: {
|
|
70
|
+
path: bigint[];
|
|
71
|
+
isLeft: boolean[];
|
|
72
|
+
}[];
|
|
73
|
+
}>, "fromFields"> & {
|
|
74
|
+
fromFields: (fields: import("o1js/dist/node/lib/provable/field").Field[]) => {
|
|
75
|
+
witnesses: RollupMerkleTreeWitness[];
|
|
76
|
+
};
|
|
77
|
+
} & {
|
|
78
|
+
fromValue: (value: {
|
|
79
|
+
witnesses: RollupMerkleTreeWitness[] | {
|
|
80
|
+
path: bigint[];
|
|
81
|
+
isLeft: boolean[];
|
|
82
|
+
}[];
|
|
83
|
+
}) => {
|
|
84
|
+
witnesses: RollupMerkleTreeWitness[];
|
|
85
|
+
};
|
|
86
|
+
toInput: (x: {
|
|
87
|
+
witnesses: RollupMerkleTreeWitness[];
|
|
88
|
+
}) => {
|
|
89
|
+
fields?: import("o1js/dist/node/lib/provable/field").Field[] | undefined;
|
|
90
|
+
packed?: [import("o1js/dist/node/lib/provable/field").Field, number][] | undefined;
|
|
91
|
+
};
|
|
92
|
+
toJSON: (x: {
|
|
93
|
+
witnesses: RollupMerkleTreeWitness[];
|
|
94
|
+
}) => {
|
|
95
|
+
witnesses: {
|
|
96
|
+
path: string[];
|
|
97
|
+
isLeft: boolean[];
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
100
|
+
fromJSON: (x: {
|
|
101
|
+
witnesses: {
|
|
102
|
+
path: string[];
|
|
103
|
+
isLeft: boolean[];
|
|
104
|
+
}[];
|
|
105
|
+
}) => {
|
|
106
|
+
witnesses: RollupMerkleTreeWitness[];
|
|
107
|
+
};
|
|
108
|
+
empty: () => {
|
|
109
|
+
witnesses: RollupMerkleTreeWitness[];
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export declare class MerkleWitnessBatch extends MerkleWitnessBatch_base {
|
|
113
|
+
}
|
|
114
|
+
declare const ProvableStateTransitionEntry_base: (new (value: {
|
|
115
|
+
stateTransition: ProvableStateTransition;
|
|
116
|
+
type: ProvableStateTransitionType;
|
|
117
|
+
witnessRoot: import("o1js/dist/node/lib/provable/bool").Bool;
|
|
118
|
+
}) => {
|
|
119
|
+
stateTransition: ProvableStateTransition;
|
|
120
|
+
type: ProvableStateTransitionType;
|
|
121
|
+
witnessRoot: import("o1js/dist/node/lib/provable/bool").Bool;
|
|
122
|
+
}) & {
|
|
123
|
+
_isStruct: true;
|
|
124
|
+
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf").Provable<{
|
|
125
|
+
stateTransition: ProvableStateTransition;
|
|
126
|
+
type: ProvableStateTransitionType;
|
|
127
|
+
witnessRoot: import("o1js/dist/node/lib/provable/bool").Bool;
|
|
128
|
+
}, {
|
|
129
|
+
stateTransition: {
|
|
72
130
|
path: bigint;
|
|
73
131
|
from: {
|
|
74
132
|
isSome: boolean;
|
|
@@ -78,59 +136,53 @@ declare const StateTransitionProvableBatch_base: (new (value: {
|
|
|
78
136
|
isSome: boolean;
|
|
79
137
|
value: bigint;
|
|
80
138
|
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
type:
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
path: bigint[];
|
|
87
|
-
isLeft: boolean[];
|
|
88
|
-
}[];
|
|
139
|
+
};
|
|
140
|
+
type: {
|
|
141
|
+
type: bigint;
|
|
142
|
+
};
|
|
143
|
+
witnessRoot: boolean;
|
|
89
144
|
}>, "fromFields"> & {
|
|
90
145
|
fromFields: (fields: import("o1js/dist/node/lib/provable/field").Field[]) => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
146
|
+
stateTransition: ProvableStateTransition;
|
|
147
|
+
type: ProvableStateTransitionType;
|
|
148
|
+
witnessRoot: import("o1js/dist/node/lib/provable/bool").Bool;
|
|
94
149
|
};
|
|
95
150
|
} & {
|
|
96
151
|
fromValue: (value: {
|
|
97
|
-
|
|
98
|
-
path: bigint;
|
|
99
|
-
from: {
|
|
100
|
-
isSome: boolean;
|
|
101
|
-
value: bigint;
|
|
152
|
+
stateTransition: ProvableStateTransition | {
|
|
153
|
+
path: string | number | bigint | import("o1js/dist/node/lib/provable/field").Field;
|
|
154
|
+
from: import("./Option").ProvableOption | {
|
|
155
|
+
isSome: boolean | import("o1js/dist/node/lib/provable/bool").Bool;
|
|
156
|
+
value: string | number | bigint | import("o1js/dist/node/lib/provable/field").Field;
|
|
102
157
|
};
|
|
103
|
-
to: {
|
|
104
|
-
isSome: boolean;
|
|
105
|
-
value: bigint;
|
|
158
|
+
to: import("./Option").ProvableOption | {
|
|
159
|
+
isSome: boolean | import("o1js/dist/node/lib/provable/bool").Bool;
|
|
160
|
+
value: string | number | bigint | import("o1js/dist/node/lib/provable/field").Field;
|
|
106
161
|
};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
type:
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
path: bigint[];
|
|
113
|
-
isLeft: boolean[];
|
|
114
|
-
}[];
|
|
162
|
+
};
|
|
163
|
+
type: ProvableStateTransitionType | {
|
|
164
|
+
type: string | number | bigint | import("o1js/dist/node/lib/provable/field").Field;
|
|
165
|
+
};
|
|
166
|
+
witnessRoot: boolean | import("o1js/dist/node/lib/provable/bool").Bool;
|
|
115
167
|
}) => {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
168
|
+
stateTransition: ProvableStateTransition;
|
|
169
|
+
type: ProvableStateTransitionType;
|
|
170
|
+
witnessRoot: import("o1js/dist/node/lib/provable/bool").Bool;
|
|
119
171
|
};
|
|
120
172
|
toInput: (x: {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
173
|
+
stateTransition: ProvableStateTransition;
|
|
174
|
+
type: ProvableStateTransitionType;
|
|
175
|
+
witnessRoot: import("o1js/dist/node/lib/provable/bool").Bool;
|
|
124
176
|
}) => {
|
|
125
177
|
fields?: import("o1js/dist/node/lib/provable/field").Field[] | undefined;
|
|
126
178
|
packed?: [import("o1js/dist/node/lib/provable/field").Field, number][] | undefined;
|
|
127
179
|
};
|
|
128
180
|
toJSON: (x: {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
181
|
+
stateTransition: ProvableStateTransition;
|
|
182
|
+
type: ProvableStateTransitionType;
|
|
183
|
+
witnessRoot: import("o1js/dist/node/lib/provable/bool").Bool;
|
|
132
184
|
}) => {
|
|
133
|
-
|
|
185
|
+
stateTransition: {
|
|
134
186
|
path: string;
|
|
135
187
|
from: {
|
|
136
188
|
isSome: boolean;
|
|
@@ -140,17 +192,14 @@ declare const StateTransitionProvableBatch_base: (new (value: {
|
|
|
140
192
|
isSome: boolean;
|
|
141
193
|
value: string;
|
|
142
194
|
};
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
type:
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
path: string[];
|
|
149
|
-
isLeft: boolean[];
|
|
150
|
-
}[];
|
|
195
|
+
};
|
|
196
|
+
type: {
|
|
197
|
+
type: string;
|
|
198
|
+
};
|
|
199
|
+
witnessRoot: boolean;
|
|
151
200
|
};
|
|
152
201
|
fromJSON: (x: {
|
|
153
|
-
|
|
202
|
+
stateTransition: {
|
|
154
203
|
path: string;
|
|
155
204
|
from: {
|
|
156
205
|
isSome: boolean;
|
|
@@ -160,39 +209,142 @@ declare const StateTransitionProvableBatch_base: (new (value: {
|
|
|
160
209
|
isSome: boolean;
|
|
161
210
|
value: string;
|
|
162
211
|
};
|
|
212
|
+
};
|
|
213
|
+
type: {
|
|
214
|
+
type: string;
|
|
215
|
+
};
|
|
216
|
+
witnessRoot: boolean;
|
|
217
|
+
}) => {
|
|
218
|
+
stateTransition: ProvableStateTransition;
|
|
219
|
+
type: ProvableStateTransitionType;
|
|
220
|
+
witnessRoot: import("o1js/dist/node/lib/provable/bool").Bool;
|
|
221
|
+
};
|
|
222
|
+
empty: () => {
|
|
223
|
+
stateTransition: ProvableStateTransition;
|
|
224
|
+
type: ProvableStateTransitionType;
|
|
225
|
+
witnessRoot: import("o1js/dist/node/lib/provable/bool").Bool;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
export declare class ProvableStateTransitionEntry extends ProvableStateTransitionEntry_base {
|
|
229
|
+
static dummy(): ProvableStateTransitionEntry;
|
|
230
|
+
}
|
|
231
|
+
declare const StateTransitionProvableBatch_base: (new (value: {
|
|
232
|
+
batch: ProvableStateTransitionEntry[];
|
|
233
|
+
}) => {
|
|
234
|
+
batch: ProvableStateTransitionEntry[];
|
|
235
|
+
}) & {
|
|
236
|
+
_isStruct: true;
|
|
237
|
+
} & Omit<import("o1js/dist/node/lib/provable/types/provable-intf").Provable<{
|
|
238
|
+
batch: ProvableStateTransitionEntry[];
|
|
239
|
+
}, {
|
|
240
|
+
batch: {
|
|
241
|
+
stateTransition: {
|
|
242
|
+
path: bigint;
|
|
243
|
+
from: {
|
|
244
|
+
isSome: boolean;
|
|
245
|
+
value: bigint;
|
|
246
|
+
};
|
|
247
|
+
to: {
|
|
248
|
+
isSome: boolean;
|
|
249
|
+
value: bigint;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
type: {
|
|
253
|
+
type: bigint;
|
|
254
|
+
};
|
|
255
|
+
witnessRoot: boolean;
|
|
256
|
+
}[];
|
|
257
|
+
}>, "fromFields"> & {
|
|
258
|
+
fromFields: (fields: import("o1js/dist/node/lib/provable/field").Field[]) => {
|
|
259
|
+
batch: ProvableStateTransitionEntry[];
|
|
260
|
+
};
|
|
261
|
+
} & {
|
|
262
|
+
fromValue: (value: {
|
|
263
|
+
batch: ProvableStateTransitionEntry[] | {
|
|
264
|
+
stateTransition: {
|
|
265
|
+
path: bigint;
|
|
266
|
+
from: {
|
|
267
|
+
isSome: boolean;
|
|
268
|
+
value: bigint;
|
|
269
|
+
};
|
|
270
|
+
to: {
|
|
271
|
+
isSome: boolean;
|
|
272
|
+
value: bigint;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
type: {
|
|
276
|
+
type: bigint;
|
|
277
|
+
};
|
|
278
|
+
witnessRoot: boolean;
|
|
163
279
|
}[];
|
|
164
|
-
|
|
165
|
-
|
|
280
|
+
}) => {
|
|
281
|
+
batch: ProvableStateTransitionEntry[];
|
|
282
|
+
};
|
|
283
|
+
toInput: (x: {
|
|
284
|
+
batch: ProvableStateTransitionEntry[];
|
|
285
|
+
}) => {
|
|
286
|
+
fields?: import("o1js/dist/node/lib/provable/field").Field[] | undefined;
|
|
287
|
+
packed?: [import("o1js/dist/node/lib/provable/field").Field, number][] | undefined;
|
|
288
|
+
};
|
|
289
|
+
toJSON: (x: {
|
|
290
|
+
batch: ProvableStateTransitionEntry[];
|
|
291
|
+
}) => {
|
|
292
|
+
batch: {
|
|
293
|
+
stateTransition: {
|
|
294
|
+
path: string;
|
|
295
|
+
from: {
|
|
296
|
+
isSome: boolean;
|
|
297
|
+
value: string;
|
|
298
|
+
};
|
|
299
|
+
to: {
|
|
300
|
+
isSome: boolean;
|
|
301
|
+
value: string;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
type: {
|
|
305
|
+
type: string;
|
|
306
|
+
};
|
|
307
|
+
witnessRoot: boolean;
|
|
166
308
|
}[];
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
309
|
+
};
|
|
310
|
+
fromJSON: (x: {
|
|
311
|
+
batch: {
|
|
312
|
+
stateTransition: {
|
|
313
|
+
path: string;
|
|
314
|
+
from: {
|
|
315
|
+
isSome: boolean;
|
|
316
|
+
value: string;
|
|
317
|
+
};
|
|
318
|
+
to: {
|
|
319
|
+
isSome: boolean;
|
|
320
|
+
value: string;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
type: {
|
|
324
|
+
type: string;
|
|
325
|
+
};
|
|
326
|
+
witnessRoot: boolean;
|
|
170
327
|
}[];
|
|
171
328
|
}) => {
|
|
172
|
-
batch:
|
|
173
|
-
transitionTypes: ProvableStateTransitionType[];
|
|
174
|
-
merkleWitnesses: RollupMerkleTreeWitness[];
|
|
329
|
+
batch: ProvableStateTransitionEntry[];
|
|
175
330
|
};
|
|
176
331
|
empty: () => {
|
|
177
|
-
batch:
|
|
178
|
-
transitionTypes: ProvableStateTransitionType[];
|
|
179
|
-
merkleWitnesses: RollupMerkleTreeWitness[];
|
|
332
|
+
batch: ProvableStateTransitionEntry[];
|
|
180
333
|
};
|
|
181
334
|
};
|
|
182
335
|
/**
|
|
183
336
|
* A Batch of StateTransitions to be consumed by the StateTransitionProver
|
|
184
337
|
* to prove multiple STs at once
|
|
185
338
|
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
339
|
+
* The batch is formed as an array fo ProvableSTEntries, which have a type and
|
|
340
|
+
* witnessesRoot flag attached to them.
|
|
188
341
|
*/
|
|
189
342
|
export declare class StateTransitionProvableBatch extends StateTransitionProvableBatch_base {
|
|
190
|
-
static
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
private constructor();
|
|
343
|
+
static fromBatches(batches: {
|
|
344
|
+
stateTransitions: ProvableStateTransition[];
|
|
345
|
+
applied: Bool;
|
|
346
|
+
witnessRoot: Bool;
|
|
347
|
+
}[]): StateTransitionProvableBatch[];
|
|
196
348
|
}
|
|
197
349
|
export {};
|
|
198
350
|
//# sourceMappingURL=StateTransitionProvableBatch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateTransitionProvableBatch.d.ts","sourceRoot":"","sources":["../../src/model/StateTransitionProvableBatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"StateTransitionProvableBatch.d.ts","sourceRoot":"","sources":["../../src/model/StateTransitionProvableBatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA2B,MAAM,MAAM,CAAC;AACrD,OAAO,EAAS,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAInE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,qBAAa,mBAAmB;IAC9B,gBAAuB,OAAO,KAAK;IAInC,gBAAuB,aAAa,KAAK;IAEzC,gBAAuB,iBAAiB,KAAK;CAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,gCAE/C;IACA,WAAkB,OAAO,IAAI,2BAA2B,CAEvD;IAED,WAAkB,aAAa,IAAI,2BAA2B,CAE7D;IAED,WAAkB,iBAAiB,IAAI,2BAA2B,CAEjE;IAED,OAAO,CAAC,MAAM,CAAC,IAAI;IAMZ,SAAS;IAOT,SAAS;CAGjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAAa,kBAAmB,SAAQ,uBAKtC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL,qBAAa,4BAA6B,SAAQ,iCAIhD;WACc,KAAK,IAAI,4BAA4B;CAOpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;;;;GAMG;AACH,qBAAa,4BAA6B,SAAQ,iCAKhD;WACc,WAAW,CACvB,OAAO,EAAE;QACP,gBAAgB,EAAE,uBAAuB,EAAE,CAAC;QAC5C,OAAO,EAAE,IAAI,CAAC;QACd,WAAW,EAAE,IAAI,CAAC;KACnB,EAAE,GACF,4BAA4B,EAAE;CAwClC"}
|
|
@@ -1,91 +1,98 @@
|
|
|
1
|
-
import { Bool, Provable, Struct } from "o1js";
|
|
2
|
-
import {
|
|
1
|
+
import { Bool, Field, Provable, Struct } from "o1js";
|
|
2
|
+
import { batch, RollupMerkleTreeWitness } from "@proto-kit/common";
|
|
3
3
|
import { constants } from "../Constants";
|
|
4
4
|
import { ProvableStateTransition } from "./StateTransition.js";
|
|
5
5
|
export class StateTransitionType {
|
|
6
|
-
static isNormal(type) {
|
|
7
|
-
return type === StateTransitionType.normal;
|
|
8
|
-
}
|
|
9
|
-
static isProtocol(type) {
|
|
10
|
-
return type === StateTransitionType.protocol;
|
|
11
|
-
}
|
|
12
6
|
}
|
|
13
|
-
StateTransitionType.
|
|
14
|
-
|
|
7
|
+
StateTransitionType.nothing = 2;
|
|
8
|
+
// The reason these are 0 and 1 is to efficiently check
|
|
9
|
+
// x in [inside, closing] in-circuit via the boolean trick
|
|
10
|
+
StateTransitionType.closeAndApply = 1;
|
|
11
|
+
StateTransitionType.closeAndThrowAway = 0;
|
|
12
|
+
/**
|
|
13
|
+
* STType is encoding both the type and whether it should be accumulated or not in one field
|
|
14
|
+
*/
|
|
15
15
|
export class ProvableStateTransitionType extends Struct({
|
|
16
|
-
type:
|
|
16
|
+
type: Field,
|
|
17
17
|
}) {
|
|
18
|
-
static get
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
static get nothing() {
|
|
19
|
+
return this.from(StateTransitionType.nothing);
|
|
20
|
+
}
|
|
21
|
+
static get closeAndApply() {
|
|
22
|
+
return this.from(StateTransitionType.closeAndApply);
|
|
23
|
+
}
|
|
24
|
+
static get closeAndThrowAway() {
|
|
25
|
+
return this.from(StateTransitionType.closeAndThrowAway);
|
|
22
26
|
}
|
|
23
|
-
static
|
|
27
|
+
static from(constant) {
|
|
24
28
|
return new ProvableStateTransitionType({
|
|
25
|
-
type:
|
|
29
|
+
type: Field(constant),
|
|
26
30
|
});
|
|
27
31
|
}
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
isClosing() {
|
|
33
|
+
const { type } = this;
|
|
34
|
+
// check if base is 0 or 1
|
|
35
|
+
// 0^2 == 0 && 1^2 == 1
|
|
36
|
+
return type.mul(type).equals(type);
|
|
30
37
|
}
|
|
31
|
-
|
|
32
|
-
return this.type.
|
|
38
|
+
isNothing() {
|
|
39
|
+
return this.type.equals(ProvableStateTransitionType.nothing.type);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export class MerkleWitnessBatch extends Struct({
|
|
43
|
+
witnesses: Provable.Array(RollupMerkleTreeWitness, constants.stateTransitionProverBatchSize),
|
|
44
|
+
}) {
|
|
45
|
+
}
|
|
46
|
+
export class ProvableStateTransitionEntry extends Struct({
|
|
47
|
+
stateTransition: ProvableStateTransition,
|
|
48
|
+
type: ProvableStateTransitionType,
|
|
49
|
+
witnessRoot: Bool,
|
|
50
|
+
}) {
|
|
51
|
+
static dummy() {
|
|
52
|
+
return {
|
|
53
|
+
stateTransition: ProvableStateTransition.dummy(),
|
|
54
|
+
type: ProvableStateTransitionType.nothing,
|
|
55
|
+
witnessRoot: Bool(false),
|
|
56
|
+
};
|
|
33
57
|
}
|
|
34
58
|
}
|
|
35
59
|
/**
|
|
36
60
|
* A Batch of StateTransitions to be consumed by the StateTransitionProver
|
|
37
61
|
* to prove multiple STs at once
|
|
38
62
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
63
|
+
* The batch is formed as an array fo ProvableSTEntries, which have a type and
|
|
64
|
+
* witnessesRoot flag attached to them.
|
|
41
65
|
*/
|
|
42
66
|
export class StateTransitionProvableBatch extends Struct({
|
|
43
|
-
batch: Provable.Array(
|
|
44
|
-
transitionTypes: Provable.Array(ProvableStateTransitionType, constants.stateTransitionProverBatchSize),
|
|
45
|
-
merkleWitnesses: Provable.Array(RollupMerkleTreeWitness, constants.stateTransitionProverBatchSize),
|
|
67
|
+
batch: Provable.Array(ProvableStateTransitionEntry, constants.stateTransitionProverBatchSize),
|
|
46
68
|
}) {
|
|
47
|
-
static
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
69
|
+
static fromBatches(batches) {
|
|
70
|
+
const flattened = [];
|
|
71
|
+
for (const stBatch of batches) {
|
|
72
|
+
const entries = stBatch.stateTransitions.map((stateTransition, j, sts) => {
|
|
73
|
+
return {
|
|
74
|
+
stateTransition,
|
|
75
|
+
type:
|
|
76
|
+
// eslint-disable-next-line no-nested-ternary
|
|
77
|
+
j === sts.length - 1
|
|
78
|
+
? stBatch.applied.toBoolean()
|
|
79
|
+
? ProvableStateTransitionType.closeAndApply
|
|
80
|
+
: ProvableStateTransitionType.closeAndThrowAway
|
|
81
|
+
: ProvableStateTransitionType.nothing,
|
|
82
|
+
witnessRoot: Bool(false),
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
flattened.push(...entries);
|
|
86
|
+
if (stBatch.witnessRoot.toBoolean() && flattened.length > 0) {
|
|
87
|
+
flattened.at(-1).witnessRoot = Bool(true);
|
|
56
88
|
}
|
|
57
|
-
if (normalSTsStarted && x.isProtocol().toBoolean()) {
|
|
58
|
-
throw new Error("Order in initializing STBatch not correct");
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
while (batch.length < constants.stateTransitionProverBatchSize) {
|
|
62
|
-
batch.push(ProvableStateTransition.dummy());
|
|
63
|
-
transitionTypes.push(ProvableStateTransitionType.normal);
|
|
64
|
-
witnesses.push(new RollupMerkleTree(new InMemoryMerkleTreeStorage()).getWitness(BigInt(0)));
|
|
65
89
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
90
|
+
const values = batch(flattened, constants.stateTransitionProverBatchSize, () => ProvableStateTransitionEntry.dummy());
|
|
91
|
+
return values.map((stBatch) => {
|
|
92
|
+
return new StateTransitionProvableBatch({
|
|
93
|
+
batch: stBatch,
|
|
94
|
+
});
|
|
70
95
|
});
|
|
71
96
|
}
|
|
72
|
-
static fromTransitions(transitions, protocolTransitions, merkleWitnesses) {
|
|
73
|
-
const array = transitions.slice().concat(protocolTransitions);
|
|
74
|
-
const transitionTypes = range(0, transitions.length)
|
|
75
|
-
.map(() => ProvableStateTransitionType.normal)
|
|
76
|
-
.concat(range(0, protocolTransitions.length).map(() => ProvableStateTransitionType.protocol));
|
|
77
|
-
while (array.length < constants.stateTransitionProverBatchSize) {
|
|
78
|
-
array.push(ProvableStateTransition.dummy());
|
|
79
|
-
transitionTypes.push(ProvableStateTransitionType.normal);
|
|
80
|
-
}
|
|
81
|
-
return new StateTransitionProvableBatch({
|
|
82
|
-
batch: array,
|
|
83
|
-
transitionTypes,
|
|
84
|
-
merkleWitnesses,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
constructor(object) {
|
|
88
|
-
super(object);
|
|
89
|
-
}
|
|
90
97
|
}
|
|
91
98
|
//# sourceMappingURL=StateTransitionProvableBatch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateTransitionProvableBatch.js","sourceRoot":"","sources":["../../src/model/StateTransitionProvableBatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE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a;4BAC3C,CAAC,CAAC,2BAA2B,CAAC,iBAAiB;wBACjD,CAAC,CAAC,2BAA2B,CAAC,OAAO;oBACzC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC;iBACzB,CAAC;YACJ,CAAC,CACF,CAAC;YAEJ,SAAS,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;YAE3B,IAAI,OAAO,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3D,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;aAC5C;SACF;QAED,MAAM,MAAM,GAAG,KAAK,CAClB,SAAS,EACT,SAAS,CAAC,8BAA8B,EACxC,GAAG,EAAE,CAAC,4BAA4B,CAAC,KAAK,EAAE,CAC3C,CAAC;QAEF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YAC5B,OAAO,IAAI,4BAA4B,CAAC;gBACtC,KAAK,EAAE,OAAO;aACf,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -114,6 +114,7 @@ export declare class RuntimeTransaction extends RuntimeTransaction_base {
|
|
|
114
114
|
}): RuntimeTransaction;
|
|
115
115
|
static dummyTransaction(): RuntimeTransaction;
|
|
116
116
|
assertTransactionType(isMessage: Bool): void;
|
|
117
|
+
isDummy(): Bool;
|
|
117
118
|
hashData(): Field[];
|
|
118
119
|
static fromHashData(fields: Field[]): RuntimeTransaction;
|
|
119
120
|
hash(): Field;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeTransaction.d.ts","sourceRoot":"","sources":["../../../src/model/transaction/RuntimeTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAY,SAAS,EAAU,MAAM,EAAE,MAAM,MAAM,CAAC;AAGxE,OAAO,EAAE,e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