Skip to content

Commit

Permalink
Add output field to vm.ComputationResources (#2096)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirugan authored Aug 28, 2024
1 parent 0f2d88b commit 54e20a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion adapters/vm2core/vm2core.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func AdaptExecutionResources(resources *vm.ExecutionResources) *core.ExecutionRe
Keccak: resources.Keccak,
Poseidon: resources.Poseidon,
SegmentArena: resources.SegmentArena,
Output: 0, // todo(kirill) recheck, add Output field to core?
Output: resources.Output,
AddMod: resources.AddMod,
MulMod: resources.MulMod,
RangeCheck96: resources.RangeCheck96,
Expand Down
7 changes: 4 additions & 3 deletions adapters/vm2core/vm2core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,17 @@ func TestAdaptExecutionResources(t *testing.T) {
Pedersen: 1,
RangeCheck: 2,
Bitwise: 3,
Output: 0,
Ecsda: 4,
EcOp: 5,
Keccak: 6,
Poseidon: 7,
SegmentArena: 8,
Output: 11,
},
MemoryHoles: 9,
Steps: 10,
}, vm2core.AdaptExecutionResources(&vm.ExecutionResources{
ComputationResources: vm.ComputationResources{
Steps: 10,
MemoryHoles: 9,
Pedersen: 1,
RangeCheck: 2,
Bitwise: 3,
Expand All @@ -96,6 +94,9 @@ func TestAdaptExecutionResources(t *testing.T) {
Keccak: 6,
Poseidon: 7,
SegmentArena: 8,
MemoryHoles: 9,
Steps: 10,
Output: 11,
},
}))
}
1 change: 1 addition & 0 deletions vm/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ type ComputationResources struct {
AddMod uint64 `json:"add_mod_builtin,omitempty"`
MulMod uint64 `json:"mul_mod_builtin,omitempty"`
RangeCheck96 uint64 `json:"range_check_96_builtin,omitempty"`
Output uint64 `json:"output_builtin,omitempty"`
}

type DataAvailability struct {
Expand Down

0 comments on commit 54e20a6

Please sign in to comment.