@aztec/simulator 0.87.7 → 1.0.0-nightly.20250605
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/dest/public/avm/avm_gas.d.ts +4 -5
- package/dest/public/avm/avm_gas.d.ts.map +1 -1
- package/dest/public/avm/avm_gas.js +29 -19
- package/dest/public/avm/fixtures/utils.js +1 -1
- package/dest/public/avm/opcodes/accrued_substate.d.ts.map +1 -1
- package/dest/public/avm/opcodes/accrued_substate.js +8 -7
- package/dest/public/avm/opcodes/addressing_mode.d.ts +2 -0
- package/dest/public/avm/opcodes/addressing_mode.d.ts.map +1 -1
- package/dest/public/avm/opcodes/addressing_mode.js +6 -0
- package/dest/public/avm/opcodes/arithmetic.d.ts.map +1 -1
- package/dest/public/avm/opcodes/arithmetic.js +1 -1
- package/dest/public/avm/opcodes/bitwise.d.ts +5 -1
- package/dest/public/avm/opcodes/bitwise.d.ts.map +1 -1
- package/dest/public/avm/opcodes/bitwise.js +17 -2
- package/dest/public/avm/opcodes/comparators.d.ts.map +1 -1
- package/dest/public/avm/opcodes/comparators.js +1 -1
- package/dest/public/avm/opcodes/contract.d.ts.map +1 -1
- package/dest/public/avm/opcodes/contract.js +1 -1
- package/dest/public/avm/opcodes/control_flow.d.ts.map +1 -1
- package/dest/public/avm/opcodes/control_flow.js +4 -4
- package/dest/public/avm/opcodes/conversion.d.ts +1 -0
- package/dest/public/avm/opcodes/conversion.d.ts.map +1 -1
- package/dest/public/avm/opcodes/conversion.js +263 -2
- package/dest/public/avm/opcodes/ec_add.d.ts.map +1 -1
- package/dest/public/avm/opcodes/ec_add.js +1 -1
- package/dest/public/avm/opcodes/environment_getters.d.ts.map +1 -1
- package/dest/public/avm/opcodes/environment_getters.js +1 -1
- package/dest/public/avm/opcodes/external_calls.d.ts.map +1 -1
- package/dest/public/avm/opcodes/external_calls.js +6 -8
- package/dest/public/avm/opcodes/hashing.d.ts.map +1 -1
- package/dest/public/avm/opcodes/hashing.js +3 -3
- package/dest/public/avm/opcodes/instruction.d.ts +9 -3
- package/dest/public/avm/opcodes/instruction.d.ts.map +1 -1
- package/dest/public/avm/opcodes/instruction.js +12 -7
- package/dest/public/avm/opcodes/memory.d.ts.map +1 -1
- package/dest/public/avm/opcodes/memory.js +8 -6
- package/dest/public/avm/opcodes/misc.js +1 -3
- package/dest/public/avm/opcodes/storage.d.ts.map +1 -1
- package/dest/public/avm/opcodes/storage.js +5 -3
- package/dest/public/fixtures/index.d.ts +1 -0
- package/dest/public/fixtures/index.d.ts.map +1 -1
- package/dest/public/fixtures/index.js +1 -0
- package/dest/public/fixtures/minimal_public_tx.d.ts +9 -0
- package/dest/public/fixtures/minimal_public_tx.d.ts.map +1 -0
- package/dest/public/fixtures/minimal_public_tx.js +43 -0
- package/dest/public/fixtures/utils.js +3 -3
- package/dest/public/hinting_db_sources.d.ts +3 -0
- package/dest/public/hinting_db_sources.d.ts.map +1 -1
- package/dest/public/hinting_db_sources.js +9 -0
- package/dest/public/index.d.ts +2 -1
- package/dest/public/index.d.ts.map +1 -1
- package/dest/public/index.js +2 -1
- package/dest/public/public_db_sources.d.ts.map +1 -1
- package/dest/public/public_db_sources.js +2 -2
- package/dest/public/public_processor/guarded_merkle_tree.d.ts +44 -0
- package/dest/public/public_processor/guarded_merkle_tree.d.ts.map +1 -0
- package/dest/public/public_processor/guarded_merkle_tree.js +105 -0
- package/dest/public/public_processor/public_processor.d.ts +6 -16
- package/dest/public/public_processor/public_processor.d.ts.map +1 -1
- package/dest/public/public_processor/public_processor.js +32 -16
- package/dest/public/public_tx_simulator/public_tx_context.d.ts +3 -1
- package/dest/public/public_tx_simulator/public_tx_context.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/public_tx_context.js +18 -15
- package/dest/public/public_tx_simulator/public_tx_simulator.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/public_tx_simulator.js +0 -3
- package/dest/public/side_effect_trace.d.ts +4 -1
- package/dest/public/side_effect_trace.d.ts.map +1 -1
- package/dest/public/side_effect_trace.js +13 -2
- package/dest/public/side_effect_trace_interface.d.ts +1 -0
- package/dest/public/side_effect_trace_interface.d.ts.map +1 -1
- package/dest/public/state_manager/state_manager.d.ts +1 -0
- package/dest/public/state_manager/state_manager.d.ts.map +1 -1
- package/dest/public/state_manager/state_manager.js +3 -0
- package/package.json +15 -15
- package/src/public/avm/avm_gas.ts +21 -15
- package/src/public/avm/fixtures/utils.ts +1 -1
- package/src/public/avm/opcodes/accrued_substate.ts +23 -7
- package/src/public/avm/opcodes/addressing_mode.ts +8 -0
- package/src/public/avm/opcodes/arithmetic.ts +3 -1
- package/src/public/avm/opcodes/bitwise.ts +26 -2
- package/src/public/avm/opcodes/comparators.ts +3 -1
- package/src/public/avm/opcodes/contract.ts +3 -1
- package/src/public/avm/opcodes/control_flow.ts +6 -4
- package/src/public/avm/opcodes/conversion.ts +21 -2
- package/src/public/avm/opcodes/ec_add.ts +3 -1
- package/src/public/avm/opcodes/environment_getters.ts +3 -1
- package/src/public/avm/opcodes/external_calls.ts +16 -8
- package/src/public/avm/opcodes/hashing.ts +11 -3
- package/src/public/avm/opcodes/instruction.ts +14 -7
- package/src/public/avm/opcodes/memory.ts +23 -6
- package/src/public/avm/opcodes/misc.ts +4 -4
- package/src/public/avm/opcodes/storage.ts +13 -3
- package/src/public/fixtures/index.ts +1 -0
- package/src/public/fixtures/minimal_public_tx.ts +57 -0
- package/src/public/fixtures/utils.ts +3 -3
- package/src/public/hinting_db_sources.ts +15 -0
- package/src/public/index.ts +2 -1
- package/src/public/public_db_sources.ts +3 -13
- package/src/public/public_processor/guarded_merkle_tree.ts +148 -0
- package/src/public/public_processor/public_processor.ts +47 -34
- package/src/public/public_tx_simulator/public_tx_context.ts +39 -20
- package/src/public/public_tx_simulator/public_tx_simulator.ts +0 -3
- package/src/public/side_effect_trace.ts +13 -0
- package/src/public/side_effect_trace_interface.ts +1 -0
- package/src/public/state_manager/state_manager.ts +4 -0
|
@@ -36,10 +36,9 @@ export declare const EmptyGas: Gas;
|
|
|
36
36
|
export declare const GAS_DIMENSIONS: readonly ["l2Gas", "daGas"];
|
|
37
37
|
/** Returns the fixed base gas cost for a given opcode. */
|
|
38
38
|
export declare function getBaseGasCost(opcode: Opcode): Gas;
|
|
39
|
+
export declare function computeAddressingCost(indirectOperandsCount: number, relativeOperandsCount: number): Gas;
|
|
39
40
|
export declare function getDynamicGasCost(opcode: Opcode): Gas;
|
|
40
|
-
/** Returns
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
daGas: number;
|
|
44
|
-
};
|
|
41
|
+
/** Returns a multiplier based on the byte size of the type represented by the integer tag.
|
|
42
|
+
* Used to account for necessary rows in the bitwise trace. Throws on invalid. */
|
|
43
|
+
export declare function getBitwiseDynamicGasMultiplier(tag: TypeTag): 0 | 1 | 2 | 8 | 4 | 16;
|
|
45
44
|
//# sourceMappingURL=avm_gas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avm_gas.d.ts","sourceRoot":"","sources":["../../../src/public/avm/avm_gas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AAEtE,sCAAsC;AACtC,MAAM,MAAM,GAAG,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG;;;EAEpC;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;;;EAE7E;AAED,8EAA8E;AAC9E,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC;WAfpC,MAAM;WACN,MAAM;EAgBd;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,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0DAA0D;AAC1D,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAElD;AAED,wBAAgB,qBAAqB,CAAC,qBAAqB,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,GAAG,GAAG,CAKvG;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAErD;AAED;iFACiF;AACjF,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,OAAO,0BAmB1D"}
|
|
@@ -95,7 +95,7 @@ function makeCost(l2Gas, daGas) {
|
|
|
95
95
|
[Opcode.MOV_8]: makeCost(c.AVM_MOV_BASE_L2_GAS, 0),
|
|
96
96
|
[Opcode.MOV_16]: makeCost(c.AVM_MOV_BASE_L2_GAS, 0),
|
|
97
97
|
[Opcode.SLOAD]: makeCost(c.AVM_SLOAD_BASE_L2_GAS, 0),
|
|
98
|
-
[Opcode.SSTORE]: makeCost(c.AVM_SSTORE_BASE_L2_GAS,
|
|
98
|
+
[Opcode.SSTORE]: makeCost(c.AVM_SSTORE_BASE_L2_GAS, 0),
|
|
99
99
|
[Opcode.NOTEHASHEXISTS]: makeCost(c.AVM_NOTEHASHEXISTS_BASE_L2_GAS, 0),
|
|
100
100
|
[Opcode.EMITNOTEHASH]: makeCost(c.AVM_EMITNOTEHASH_BASE_L2_GAS, c.AVM_EMITNOTEHASH_BASE_DA_GAS),
|
|
101
101
|
[Opcode.NULLIFIEREXISTS]: makeCost(c.AVM_NULLIFIEREXISTS_BASE_L2_GAS, 0),
|
|
@@ -125,45 +125,55 @@ const DYNAMIC_GAS_COSTS = new Map([
|
|
|
125
125
|
Opcode.RETURNDATACOPY,
|
|
126
126
|
makeCost(c.AVM_RETURNDATACOPY_DYN_L2_GAS, 0)
|
|
127
127
|
],
|
|
128
|
+
// TODO: Call and static call based on bytecode length
|
|
128
129
|
[
|
|
129
130
|
Opcode.EMITUNENCRYPTEDLOG,
|
|
130
|
-
makeCost(
|
|
131
|
+
makeCost(0, c.AVM_EMITUNENCRYPTEDLOG_DYN_DA_GAS)
|
|
131
132
|
],
|
|
132
133
|
[
|
|
133
|
-
Opcode.
|
|
134
|
-
makeCost(c.
|
|
134
|
+
Opcode.TORADIXBE,
|
|
135
|
+
makeCost(c.AVM_TORADIXBE_DYN_L2_GAS, 0)
|
|
135
136
|
],
|
|
136
137
|
[
|
|
137
|
-
Opcode.
|
|
138
|
-
makeCost(c.
|
|
138
|
+
Opcode.AND_8,
|
|
139
|
+
makeCost(c.AVM_BITWISE_DYN_L2_GAS, 0)
|
|
139
140
|
],
|
|
140
141
|
[
|
|
141
|
-
Opcode.
|
|
142
|
-
makeCost(c.
|
|
142
|
+
Opcode.AND_16,
|
|
143
|
+
makeCost(c.AVM_BITWISE_DYN_L2_GAS, 0)
|
|
143
144
|
],
|
|
144
145
|
[
|
|
145
|
-
Opcode.
|
|
146
|
-
makeCost(c.
|
|
146
|
+
Opcode.OR_8,
|
|
147
|
+
makeCost(c.AVM_BITWISE_DYN_L2_GAS, 0)
|
|
147
148
|
],
|
|
148
149
|
[
|
|
149
|
-
Opcode.
|
|
150
|
-
makeCost(c.
|
|
150
|
+
Opcode.OR_16,
|
|
151
|
+
makeCost(c.AVM_BITWISE_DYN_L2_GAS, 0)
|
|
151
152
|
],
|
|
152
153
|
[
|
|
153
|
-
Opcode.
|
|
154
|
-
makeCost(c.
|
|
154
|
+
Opcode.XOR_8,
|
|
155
|
+
makeCost(c.AVM_BITWISE_DYN_L2_GAS, 0)
|
|
156
|
+
],
|
|
157
|
+
[
|
|
158
|
+
Opcode.XOR_16,
|
|
159
|
+
makeCost(c.AVM_BITWISE_DYN_L2_GAS, 0)
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
Opcode.SSTORE,
|
|
163
|
+
makeCost(0, c.AVM_SSTORE_DYN_DA_GAS)
|
|
155
164
|
]
|
|
156
165
|
]);
|
|
157
166
|
/** Returns the fixed base gas cost for a given opcode. */ export function getBaseGasCost(opcode) {
|
|
158
167
|
return BASE_GAS_COSTS[opcode];
|
|
159
168
|
}
|
|
169
|
+
export function computeAddressingCost(indirectOperandsCount, relativeOperandsCount) {
|
|
170
|
+
return makeCost(indirectOperandsCount * c.AVM_ADDRESSING_INDIRECT_L2_GAS + relativeOperandsCount * c.AVM_ADDRESSING_RELATIVE_L2_GAS, 0);
|
|
171
|
+
}
|
|
160
172
|
export function getDynamicGasCost(opcode) {
|
|
161
173
|
return DYNAMIC_GAS_COSTS.has(opcode) ? DYNAMIC_GAS_COSTS.get(opcode) : makeCost(0, 0);
|
|
162
174
|
}
|
|
163
|
-
/** Returns
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
/** Returns a multiplier based on the size of the type represented by the tag. Throws on uninitialized or invalid. */ function getGasCostMultiplierFromTypeTag(tag) {
|
|
175
|
+
/** Returns a multiplier based on the byte size of the type represented by the integer tag.
|
|
176
|
+
* Used to account for necessary rows in the bitwise trace. Throws on invalid. */ export function getBitwiseDynamicGasMultiplier(tag) {
|
|
167
177
|
switch(tag){
|
|
168
178
|
case TypeTag.UINT1:
|
|
169
179
|
return 1;
|
|
@@ -178,7 +188,7 @@ export function getDynamicGasCost(opcode) {
|
|
|
178
188
|
case TypeTag.UINT128:
|
|
179
189
|
return 16;
|
|
180
190
|
case TypeTag.FIELD:
|
|
181
|
-
return
|
|
191
|
+
return 0; // Field is not allowed for bitwise operations. However we don't fail in gas, since we'll fail in bitwise.
|
|
182
192
|
case TypeTag.INVALID:
|
|
183
193
|
throw new InstructionExecutionError(`Invalid tag type for gas cost multiplier: ${TypeTag[tag]}`);
|
|
184
194
|
}
|
|
@@ -73,7 +73,7 @@ export function resolveContractAssertionMessage(functionName, revertReason, outp
|
|
|
73
73
|
const bytecode = getContractFunctionArtifact(PUBLIC_DISPATCH_FN_NAME, contractArtifact).bytecode;
|
|
74
74
|
const contractClass = await makeContractClassPublic(seed, bytecode);
|
|
75
75
|
const constructorAbi = getContractFunctionAbi('constructor', contractArtifact);
|
|
76
|
-
const { publicKeys } = await deriveKeys(Fr
|
|
76
|
+
const { publicKeys } = await deriveKeys(new Fr(seed));
|
|
77
77
|
const initializationHash = await computeInitializationHash(constructorAbi, constructorArgs);
|
|
78
78
|
const contractInstance = originalContractClassId === undefined ? await makeContractInstanceFromClassId(contractClass.id, seed, {
|
|
79
79
|
deployer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accrued_substate.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/accrued_substate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,cAAe,SAAQ,WAAW;IAa3C,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,YAAY;IAftB,MAAM,CAAC,IAAI,EAAE,MAAM,CAAoB;IACvC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAyB;IAEvD,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAMxB;gBAGQ,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM;IAKjB,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"accrued_substate.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/accrued_substate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,cAAe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wBzD;AAED,qBAAa,iBAAkB,SAAQ,WAAW;IAO9C,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,aAAa;IARvB,MAAM,CAAC,IAAI,EAAE,MAAM,CAAmB;IACtC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAwB;IAEtD,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAkF;gBAGlG,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM;IAKlB,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAoBzD"}
|
|
@@ -25,7 +25,7 @@ export class NoteHashExists extends Instruction {
|
|
|
25
25
|
async execute(context) {
|
|
26
26
|
const memory = context.machineState.memory;
|
|
27
27
|
const addressing = Addressing.fromWire(this.indirect);
|
|
28
|
-
context.machineState.consumeGas(this.
|
|
28
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
29
29
|
const operands = [
|
|
30
30
|
this.noteHashOffset,
|
|
31
31
|
this.leafIndexOffset,
|
|
@@ -57,7 +57,7 @@ export class EmitNoteHash extends Instruction {
|
|
|
57
57
|
async execute(context) {
|
|
58
58
|
const memory = context.machineState.memory;
|
|
59
59
|
const addressing = Addressing.fromWire(this.indirect);
|
|
60
|
-
context.machineState.consumeGas(this.
|
|
60
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
61
61
|
const operands = [
|
|
62
62
|
this.noteHashOffset
|
|
63
63
|
];
|
|
@@ -91,7 +91,7 @@ export class NullifierExists extends Instruction {
|
|
|
91
91
|
async execute(context) {
|
|
92
92
|
const memory = context.machineState.memory;
|
|
93
93
|
const addressing = Addressing.fromWire(this.indirect);
|
|
94
|
-
context.machineState.consumeGas(this.
|
|
94
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
95
95
|
const operands = [
|
|
96
96
|
this.nullifierOffset,
|
|
97
97
|
this.addressOffset,
|
|
@@ -125,7 +125,7 @@ export class EmitNullifier extends Instruction {
|
|
|
125
125
|
}
|
|
126
126
|
const memory = context.machineState.memory;
|
|
127
127
|
const addressing = Addressing.fromWire(this.indirect);
|
|
128
|
-
context.machineState.consumeGas(this.
|
|
128
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
129
129
|
const operands = [
|
|
130
130
|
this.nullifierOffset
|
|
131
131
|
];
|
|
@@ -165,7 +165,7 @@ export class L1ToL2MessageExists extends Instruction {
|
|
|
165
165
|
async execute(context) {
|
|
166
166
|
const memory = context.machineState.memory;
|
|
167
167
|
const addressing = Addressing.fromWire(this.indirect);
|
|
168
|
-
context.machineState.consumeGas(this.
|
|
168
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
169
169
|
const operands = [
|
|
170
170
|
this.msgHashOffset,
|
|
171
171
|
this.msgLeafIndexOffset,
|
|
@@ -202,6 +202,7 @@ export class EmitUnencryptedLog extends Instruction {
|
|
|
202
202
|
}
|
|
203
203
|
const memory = context.machineState.memory;
|
|
204
204
|
const addressing = Addressing.fromWire(this.indirect);
|
|
205
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
205
206
|
const operands = [
|
|
206
207
|
this.logOffset,
|
|
207
208
|
this.logSizeOffset
|
|
@@ -211,7 +212,7 @@ export class EmitUnencryptedLog extends Instruction {
|
|
|
211
212
|
const logSize = memory.get(logSizeOffset).toNumber();
|
|
212
213
|
memory.checkTagsRange(TypeTag.FIELD, logOffset, logSize);
|
|
213
214
|
const contractAddress = context.environment.address;
|
|
214
|
-
context.machineState.consumeGas(this.
|
|
215
|
+
context.machineState.consumeGas(this.dynamicGasCost(logSize));
|
|
215
216
|
const log = memory.getSlice(logOffset, logSize).map((f)=>f.toFr());
|
|
216
217
|
context.persistableState.writePublicLog(contractAddress, log);
|
|
217
218
|
}
|
|
@@ -238,7 +239,7 @@ export class SendL2ToL1Message extends Instruction {
|
|
|
238
239
|
}
|
|
239
240
|
const memory = context.machineState.memory;
|
|
240
241
|
const addressing = Addressing.fromWire(this.indirect);
|
|
241
|
-
context.machineState.consumeGas(this.
|
|
242
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
242
243
|
const operands = [
|
|
243
244
|
this.recipientOffset,
|
|
244
245
|
this.contentOffset
|
|
@@ -17,6 +17,8 @@ export declare class Addressing {
|
|
|
17
17
|
static fromModes(modes: AddressingMode[]): Addressing;
|
|
18
18
|
static fromWire(wireModes: number): Addressing;
|
|
19
19
|
toWire(): number;
|
|
20
|
+
indirectOperandsCount(): number;
|
|
21
|
+
relativeOperandsCount(): number;
|
|
20
22
|
/**
|
|
21
23
|
* Resolves the offsets using the addressing mode.
|
|
22
24
|
* @param offsets The offsets to resolve.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addressing_mode.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/addressing_mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EAAgB,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,oBAAY,cAAc;IACxB,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,QAAQ,IAAI;IACZ,iBAAiB,IAAI;CACtB;AAED,kEAAkE;AAClE,qBAAa,UAAU;IAEnB,qDAAqD;IACrD,OAAO,CAAC,QAAQ,CAAC,cAAc;;IAD/B,qDAAqD;IACpC,cAAc,EAAE,KAAK,CAAC,cAAc,EAAE,OAAO,gBAAgB,CAAC;WAGnE,SAAS,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,UAAU;WAO9C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU;IAa9C,MAAM,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"addressing_mode.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/addressing_mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EAAgB,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,oBAAY,cAAc;IACxB,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,QAAQ,IAAI;IACZ,iBAAiB,IAAI;CACtB;AAED,kEAAkE;AAClE,qBAAa,UAAU;IAEnB,qDAAqD;IACrD,OAAO,CAAC,QAAQ,CAAC,cAAc;;IAD/B,qDAAqD;IACpC,cAAc,EAAE,KAAK,CAAC,cAAc,EAAE,OAAO,gBAAgB,CAAC;WAGnE,SAAS,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,UAAU;WAO9C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU;IAa9C,MAAM,IAAI,MAAM;IAehB,qBAAqB,IAAI,MAAM;IAI/B,qBAAqB,IAAI,MAAM;IAItC;;;;;OAKG;IACI,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,qBAAqB,GAAG,MAAM,EAAE;CA2BxE"}
|
|
@@ -44,6 +44,12 @@ export var AddressingMode = /*#__PURE__*/ function(AddressingMode) {
|
|
|
44
44
|
}
|
|
45
45
|
return wire;
|
|
46
46
|
}
|
|
47
|
+
indirectOperandsCount() {
|
|
48
|
+
return this.modePerOperand.filter((mode)=>mode & 1).length;
|
|
49
|
+
}
|
|
50
|
+
relativeOperandsCount() {
|
|
51
|
+
return this.modePerOperand.filter((mode)=>mode & 2).length;
|
|
52
|
+
}
|
|
47
53
|
/**
|
|
48
54
|
* Resolves the offsets using the addressing mode.
|
|
49
55
|
* @param offsets The offsets to resolve.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmetic.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/arithmetic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,WAAW,EAEhB,KAAK,qBAAqB,EAE3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,8BAAsB,iCAAkC,SAAQ,uBAAuB;IACxE,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"arithmetic.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/arithmetic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,WAAW,EAEhB,KAAK,qBAAqB,EAE3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,8BAAsB,iCAAkC,SAAQ,uBAAuB;IACxE,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBxD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,WAAW;IACvE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,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C,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI7F"}
|
|
@@ -7,7 +7,7 @@ export class ThreeOperandArithmeticInstruction extends ThreeOperandInstruction {
|
|
|
7
7
|
async execute(context) {
|
|
8
8
|
const memory = context.machineState.memory;
|
|
9
9
|
const addressing = Addressing.fromWire(this.indirect);
|
|
10
|
-
context.machineState.consumeGas(this.
|
|
10
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
11
11
|
const operands = [
|
|
12
12
|
this.aOffset,
|
|
13
13
|
this.bOffset,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AvmContext } from '../avm_context.js';
|
|
2
|
-
import { type IntegralValue, type TaggedMemoryInterface } from '../avm_memory_types.js';
|
|
2
|
+
import { type IntegralValue, type TaggedMemoryInterface, TypeTag } from '../avm_memory_types.js';
|
|
3
3
|
import { Opcode, OperandType } from '../serialization/instruction_serialization.js';
|
|
4
4
|
import { Instruction } from './instruction.js';
|
|
5
5
|
import { ThreeOperandInstruction } from './instruction_impl.js';
|
|
@@ -7,21 +7,25 @@ declare abstract class ThreeOperandBitwiseInstruction extends ThreeOperandInstru
|
|
|
7
7
|
execute(context: AvmContext): Promise<void>;
|
|
8
8
|
protected abstract compute(a: IntegralValue, b: IntegralValue): IntegralValue;
|
|
9
9
|
protected checkTags(memory: TaggedMemoryInterface, aOffset: number, bOffset: number): void;
|
|
10
|
+
protected getDynamicMultiplier(_lhsTag: TypeTag): number;
|
|
10
11
|
}
|
|
11
12
|
export declare class And extends ThreeOperandBitwiseInstruction {
|
|
12
13
|
static readonly type: string;
|
|
13
14
|
static readonly opcode = Opcode.AND_8;
|
|
14
15
|
protected compute(a: IntegralValue, b: IntegralValue): IntegralValue;
|
|
16
|
+
protected getDynamicMultiplier(lhsTag: TypeTag): number;
|
|
15
17
|
}
|
|
16
18
|
export declare class Or extends ThreeOperandBitwiseInstruction {
|
|
17
19
|
static readonly type: string;
|
|
18
20
|
static readonly opcode = Opcode.OR_8;
|
|
19
21
|
protected compute(a: IntegralValue, b: IntegralValue): IntegralValue;
|
|
22
|
+
protected getDynamicMultiplier(lhsTag: TypeTag): number;
|
|
20
23
|
}
|
|
21
24
|
export declare class Xor extends ThreeOperandBitwiseInstruction {
|
|
22
25
|
static readonly type: string;
|
|
23
26
|
static readonly opcode = Opcode.XOR_8;
|
|
24
27
|
protected compute(a: IntegralValue, b: IntegralValue): IntegralValue;
|
|
28
|
+
protected getDynamicMultiplier(lhsTag: TypeTag): number;
|
|
25
29
|
}
|
|
26
30
|
export declare class Shl extends ThreeOperandBitwiseInstruction {
|
|
27
31
|
static readonly type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitwise.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/bitwise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"bitwise.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/bitwise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,KAAK,aAAa,EAAgB,KAAK,qBAAqB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC/G,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,uBAAe,8BAA+B,SAAQ,uBAAuB;IAC9D,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBxD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAA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EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI7F;AAED,qBAAa,GAAI,SAAQ,8BAA8B;IACrD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAS;IACrC,MAAM,CAAC,QAAQ,CAAC,MAAM,gBAAgB;cAEnB,OAAO,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,GAAG,aAAa;cAG1D,SAAS,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI7F;AAED,qBAAa,GAAI,SAAQ,WAAW;IAQhC,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,SAAS;IATnB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAS;IACrC,MAAM,CAAC,QAAQ,CAAC,MAAM,gBAAgB;IAEtC,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAgF;IAC3G,MAAM,CAAC,QAAQ,CAAC,YAAY,gBAAkF;gBAGpG,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM;IAKd,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBzD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getBitwiseDynamicGasMultiplier } from '../avm_gas.js';
|
|
1
2
|
import { TaggedMemory, TypeTag } from '../avm_memory_types.js';
|
|
2
3
|
import { Opcode, OperandType } from '../serialization/instruction_serialization.js';
|
|
3
4
|
import { Addressing } from './addressing_mode.js';
|
|
@@ -7,7 +8,7 @@ class ThreeOperandBitwiseInstruction extends ThreeOperandInstruction {
|
|
|
7
8
|
async execute(context) {
|
|
8
9
|
const memory = context.machineState.memory;
|
|
9
10
|
const addressing = Addressing.fromWire(this.indirect);
|
|
10
|
-
context.machineState.consumeGas(this.
|
|
11
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
11
12
|
const operands = [
|
|
12
13
|
this.aOffset,
|
|
13
14
|
this.bOffset,
|
|
@@ -15,6 +16,8 @@ class ThreeOperandBitwiseInstruction extends ThreeOperandInstruction {
|
|
|
15
16
|
];
|
|
16
17
|
const [aOffset, bOffset, dstOffset] = addressing.resolve(operands, memory);
|
|
17
18
|
this.checkTags(memory, aOffset, bOffset);
|
|
19
|
+
const multiplier = this.getDynamicMultiplier(memory.getTag(aOffset));
|
|
20
|
+
context.machineState.consumeGas(this.dynamicGasCost(multiplier));
|
|
18
21
|
const a = memory.getAs(aOffset);
|
|
19
22
|
const b = memory.getAs(bOffset);
|
|
20
23
|
const res = this.compute(a, b);
|
|
@@ -24,6 +27,9 @@ class ThreeOperandBitwiseInstruction extends ThreeOperandInstruction {
|
|
|
24
27
|
TaggedMemory.checkIsIntegralTag(memory.getTag(aOffset));
|
|
25
28
|
memory.checkTagsAreSame(aOffset, bOffset);
|
|
26
29
|
}
|
|
30
|
+
getDynamicMultiplier(_lhsTag) {
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
34
|
export class And extends ThreeOperandBitwiseInstruction {
|
|
29
35
|
static type = 'AND';
|
|
@@ -31,6 +37,9 @@ export class And extends ThreeOperandBitwiseInstruction {
|
|
|
31
37
|
compute(a, b) {
|
|
32
38
|
return a.and(b);
|
|
33
39
|
}
|
|
40
|
+
getDynamicMultiplier(lhsTag) {
|
|
41
|
+
return getBitwiseDynamicGasMultiplier(lhsTag);
|
|
42
|
+
}
|
|
34
43
|
}
|
|
35
44
|
export class Or extends ThreeOperandBitwiseInstruction {
|
|
36
45
|
static type = 'OR';
|
|
@@ -38,6 +47,9 @@ export class Or extends ThreeOperandBitwiseInstruction {
|
|
|
38
47
|
compute(a, b) {
|
|
39
48
|
return a.or(b);
|
|
40
49
|
}
|
|
50
|
+
getDynamicMultiplier(lhsTag) {
|
|
51
|
+
return getBitwiseDynamicGasMultiplier(lhsTag);
|
|
52
|
+
}
|
|
41
53
|
}
|
|
42
54
|
export class Xor extends ThreeOperandBitwiseInstruction {
|
|
43
55
|
static type = 'XOR';
|
|
@@ -45,6 +57,9 @@ export class Xor extends ThreeOperandBitwiseInstruction {
|
|
|
45
57
|
compute(a, b) {
|
|
46
58
|
return a.xor(b);
|
|
47
59
|
}
|
|
60
|
+
getDynamicMultiplier(lhsTag) {
|
|
61
|
+
return getBitwiseDynamicGasMultiplier(lhsTag);
|
|
62
|
+
}
|
|
48
63
|
}
|
|
49
64
|
export class Shl extends ThreeOperandBitwiseInstruction {
|
|
50
65
|
static type = 'SHL';
|
|
@@ -92,7 +107,7 @@ export class Not extends Instruction {
|
|
|
92
107
|
async execute(context) {
|
|
93
108
|
const memory = context.machineState.memory;
|
|
94
109
|
const addressing = Addressing.fromWire(this.indirect);
|
|
95
|
-
context.machineState.consumeGas(this.
|
|
110
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
96
111
|
const operands = [
|
|
97
112
|
this.srcOffset,
|
|
98
113
|
this.dstOffset
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparators.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/comparators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAS,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,uBAAe,qBAAsB,SAAQ,uBAAuB;IACrD,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"comparators.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/comparators.ts"],"names":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
8
8
|
const addressing = Addressing.fromWire(this.indirect);
|
|
9
|
-
context.machineState.consumeGas(this.
|
|
9
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
10
10
|
const operands = [
|
|
11
11
|
this.aOffset,
|
|
12
12
|
this.bOffset,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,oBAAY,sBAAsB;IAChC,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,SAAS,IAAA;CACV;AAED,qBAAa,mBAAoB,SAAQ,WAAW;IAahD,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,UAAU;IAfpB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAyB;IACrD,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAA8B;IAE5D,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,WAAW,EAAE,CAMvC;gBAGQ,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM;IAKtB,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,oBAAY,sBAAsB;IAChC,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,SAAS,IAAA;CACV;AAED,qBAAa,mBAAoB,SAAQ,WAAW;IAahD,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,UAAU;IAfpB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAyB;IACrD,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAA8B;IAE5D,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,WAAW,EAAE,CAMvC;gBAGQ,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM;IAKtB,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAwClD"}
|
|
@@ -30,7 +30,7 @@ export class GetContractInstance extends Instruction {
|
|
|
30
30
|
async execute(context) {
|
|
31
31
|
const memory = context.machineState.memory;
|
|
32
32
|
const addressing = Addressing.fromWire(this.indirect);
|
|
33
|
-
context.machineState.consumeGas(this.
|
|
33
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
34
34
|
if (!(this.memberEnum in ContractInstanceMember)) {
|
|
35
35
|
throw new InstructionExecutionError(`Invalid GETCONSTRACTINSTANCE member enum ${this.memberEnum}`);
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control_flow.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/control_flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAA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MnD,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAUxC,SAAS,IAAI,OAAO;CAGrC"}
|
|
@@ -15,7 +15,7 @@ export class Jump extends Instruction {
|
|
|
15
15
|
super(), this.jumpOffset = jumpOffset;
|
|
16
16
|
}
|
|
17
17
|
async execute(context) {
|
|
18
|
-
context.machineState.consumeGas(this.
|
|
18
|
+
context.machineState.consumeGas(this.baseGasCost(0, 0));
|
|
19
19
|
context.machineState.pc = this.jumpOffset;
|
|
20
20
|
}
|
|
21
21
|
handlesPC() {
|
|
@@ -41,7 +41,7 @@ export class JumpI extends Instruction {
|
|
|
41
41
|
async execute(context) {
|
|
42
42
|
const memory = context.machineState.memory;
|
|
43
43
|
const addressing = Addressing.fromWire(this.indirect);
|
|
44
|
-
context.machineState.consumeGas(this.
|
|
44
|
+
context.machineState.consumeGas(this.baseGasCost(addressing.indirectOperandsCount(), addressing.relativeOperandsCount()));
|
|
45
45
|
const operands = [
|
|
46
46
|
this.condOffset
|
|
47
47
|
];
|
|
@@ -70,7 +70,7 @@ export class InternalCall extends Instruction {
|
|
|
70
70
|
super(), this.loc = loc;
|
|
71
71
|
}
|
|
72
72
|
async execute(context) {
|
|
73
|
-
context.machineState.consumeGas(this.
|
|
73
|
+
context.machineState.consumeGas(this.baseGasCost(0, 0));
|
|
74
74
|
context.machineState.internalCallStack.push({
|
|
75
75
|
callPc: context.machineState.pc,
|
|
76
76
|
returnPc: context.machineState.nextPc
|
|
@@ -92,7 +92,7 @@ export class InternalReturn extends Instruction {
|
|
|
92
92
|
super();
|
|
93
93
|
}
|
|
94
94
|
async execute(context) {
|
|
95
|
-
context.machineState.consumeGas(this.
|
|
95
|
+
context.machineState.consumeGas(this.baseGasCost(0, 0));
|
|
96
96
|
const stackEntry = context.machineState.internalCallStack.pop();
|
|
97
97
|
if (stackEntry === undefined) {
|
|
98
98
|
throw new InstructionExecutionError('Internal call stack empty!');
|
|
@@ -14,4 +14,5 @@ export declare class ToRadixBE extends Instruction {
|
|
|
14
14
|
constructor(indirect: number, srcOffset: number, radixOffset: number, numLimbsOffset: number, outputBitsOffset: number, dstOffset: number);
|
|
15
15
|
execute(context: AvmContext): Promise<void>;
|
|
16
16
|
}
|
|
17
|
+
export declare const MODULUS_LIMBS_PER_RADIX: number[];
|
|
17
18
|
//# sourceMappingURL=conversion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversion.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/conversion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,SAAU,SAAQ,WAAW;IAgBtC,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,SAAS;IApBnB,MAAM,CAAC,IAAI,EAAE,MAAM,CAAe;IAClC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAoB;IAGlD,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,WAAW,EAAE,CAQvC;gBAGQ,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,gBAAgB,EAAE,MAAM,EACxB,SAAS,EAAE,MAAM;IAKd,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"conversion.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/conversion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB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