Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused code #2318

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
},
}))
}
Loading