Skip to content

Commit

Permalink
Remove unused code (#2318)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleven1999 authored Dec 12, 2024
1 parent 0a21162 commit 2b1b219
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 66 deletions.
34 changes: 0 additions & 34 deletions adapters/vm2core/vm2core.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,6 @@ import (
"github.com/ethereum/go-ethereum/common"
)

func AdaptExecutionResources(resources *vm.ExecutionResources) *core.ExecutionResources {
return &core.ExecutionResources{
BuiltinInstanceCounter: core.BuiltinInstanceCounter{
Pedersen: resources.Pedersen,
RangeCheck: resources.RangeCheck,
Bitwise: resources.Bitwise,
Ecsda: resources.Ecdsa,
EcOp: resources.EcOp,
Keccak: resources.Keccak,
Poseidon: resources.Poseidon,
SegmentArena: resources.SegmentArena,
Output: resources.Output,
AddMod: resources.AddMod,
MulMod: resources.MulMod,
RangeCheck96: resources.RangeCheck96,
},
MemoryHoles: resources.MemoryHoles,
Steps: resources.Steps,
DataAvailability: adaptDA(resources.DataAvailability),
TotalGasConsumed: nil, // todo: fill after 0.13.2
}
}

func AdaptOrderedEvent(event vm.OrderedEvent) *core.Event {
return &core.Event{
From: event.From,
Expand Down Expand Up @@ -62,14 +39,3 @@ func AdaptOrderedEvents(events []vm.OrderedEvent) []*core.Event {
})
return utils.Map(events, AdaptOrderedEvent)
}

func adaptDA(da *vm.DataAvailability) *core.DataAvailability {
if da == nil {
return nil
}

return &core.DataAvailability{
L1Gas: da.L1Gas,
L1DataGas: da.L1DataGas,
}
}
32 changes: 0 additions & 32 deletions adapters/vm2core/vm2core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,35 +68,3 @@ func TestAdaptOrderedMessagesToL1(t *testing.T) {
vm2core.AdaptOrderedMessageToL1(messages[0]),
}, vm2core.AdaptOrderedMessagesToL1(messages))
}

func TestAdaptExecutionResources(t *testing.T) {
require.Equal(t, &core.ExecutionResources{
BuiltinInstanceCounter: core.BuiltinInstanceCounter{
Pedersen: 1,
RangeCheck: 2,
Bitwise: 3,
Ecsda: 4,
EcOp: 5,
Keccak: 6,
Poseidon: 7,
SegmentArena: 8,
Output: 11,
},
MemoryHoles: 9,
Steps: 10,
}, vm2core.AdaptExecutionResources(&vm.ExecutionResources{
ComputationResources: vm.ComputationResources{
Pedersen: 1,
RangeCheck: 2,
Bitwise: 3,
Ecdsa: 4,
EcOp: 5,
Keccak: 6,
Poseidon: 7,
SegmentArena: 8,
MemoryHoles: 9,
Steps: 10,
Output: 11,
},
}))
}

0 comments on commit 2b1b219

Please sign in to comment.