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

Migrate code leaf changes #800

Open
wants to merge 2 commits into
base: feat/remove-code-leaf
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions config/gasSchedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ func FillGasMapBuiltInCosts(value uint64) map[string]uint64 {
gasMap["UnGuardAccount"] = value
gasMap["TrieLoadPerNode"] = value
gasMap["TrieStorePerNode"] = value
gasMap["MigrateCodeLeaf"] = value

return gasMap
}
Expand Down
8 changes: 8 additions & 0 deletions config/gasSchedule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/mitchellh/mapstructure"
"github.com/multiversx/mx-chain-vm-go/executor"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

type operations struct {
Expand Down Expand Up @@ -172,3 +173,10 @@ func Test_isDynamicGasComputationFuncCorrectlyDefined(t *testing.T) {
assert.True(t, ok)
})
}

func TestMakeGasMap(t *testing.T) {
t.Parallel()

gasMap := MakeGasMapForTests()
require.NotNil(t, gasMap)
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ require (
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
github.com/gogo/protobuf v1.3.2
github.com/mitchellh/mapstructure v1.5.0
github.com/multiversx/mx-chain-core-go v1.2.19-0.20231129100534-356aa234f4ff
github.com/multiversx/mx-chain-core-go v1.2.19-0.20231207131555-bec3579d08d3
github.com/multiversx/mx-chain-crypto-go v1.2.10-0.20231129101537-ef355850e34b
github.com/multiversx/mx-chain-logger-go v1.0.14-0.20231129101244-c44fa1c79b03
github.com/multiversx/mx-chain-scenario-go v1.2.2-0.20231129113427-ad3056f45296
github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231129103407-a506e0debdd4
github.com/multiversx/mx-chain-vm-common-go v1.5.9-0.20231129110322-d07a35163513
github.com/multiversx/mx-chain-vm-common-go v1.5.9-0.20231207131737-758c1e47240e
github.com/multiversx/mx-components-big-int v1.0.0
github.com/pelletier/go-toml v1.9.3
github.com/stretchr/testify v1.8.1
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
github.com/multiversx/mx-chain-core-go v1.2.19-0.20231129100534-356aa234f4ff h1:Iss44e+2C4vGtQ5sU3lOqDQ+dxvwlO+Z3mSbC8T1J64=
github.com/multiversx/mx-chain-core-go v1.2.19-0.20231129100534-356aa234f4ff/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE=
github.com/multiversx/mx-chain-core-go v1.2.19-0.20231207131555-bec3579d08d3 h1:aRKyuOCTYyCAdMQHXd33Ob5Ze5gKmh5UqaMf0GbkpBs=
github.com/multiversx/mx-chain-core-go v1.2.19-0.20231207131555-bec3579d08d3/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE=
github.com/multiversx/mx-chain-crypto-go v1.2.10-0.20231129101537-ef355850e34b h1:TIE6it719ZIW0E1bFgPAgE+U3zPSkPfAloFYEIeOL3U=
github.com/multiversx/mx-chain-crypto-go v1.2.10-0.20231129101537-ef355850e34b/go.mod h1:Ap6p7QZFtwPlb++OvCG+85BfuZ+bLP/JtQp6EwjWJsI=
github.com/multiversx/mx-chain-logger-go v1.0.14-0.20231129101244-c44fa1c79b03 h1:krjJTyN9jrFTK0goMGFdgvJGy6bYSqe8EtI/HCceUmU=
Expand All @@ -93,6 +95,8 @@ github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231129103407-a506e0debdd4
github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231129103407-a506e0debdd4/go.mod h1:ioCT2oHQ+TyHQYpgjxzlUdy7dCdv56+w5HnBg9z96eY=
github.com/multiversx/mx-chain-vm-common-go v1.5.9-0.20231129110322-d07a35163513 h1:3Hm3MVIpiu4+j+aHiDOYBJBiQC62nF/rHHRJ8YIFOL4=
github.com/multiversx/mx-chain-vm-common-go v1.5.9-0.20231129110322-d07a35163513/go.mod h1:vgmpc/YegaUMAImR+WZ+kpJgv9qYF31oL12vVx/46i4=
github.com/multiversx/mx-chain-vm-common-go v1.5.9-0.20231207131737-758c1e47240e h1:6O1sVZt0M8kGOOObkLvziZzGk2N9ogJtE0jxpOYazgY=
github.com/multiversx/mx-chain-vm-common-go v1.5.9-0.20231207131737-758c1e47240e/go.mod h1:kd+f708v/b5L1VVxaoYYEh1Z4poAfGOD+wRVKxLxasE=
github.com/multiversx/mx-components-big-int v1.0.0 h1:Wkr8lSzK2nDqixOrrBa47VNuqdhV1m/aJhaP1EMaiS8=
github.com/multiversx/mx-components-big-int v1.0.0/go.mod h1:maIEMgHlNE2u78JaDD0oLzri+ShgU4okHfzP3LWGdQM=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
Expand Down
5 changes: 5 additions & 0 deletions mock/world/worldAccountsAdapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ func (m *MockAccountsAdapter) IsPruningEnabled() bool {
return false
}

// MigrateCodeLeaf -
func (m *MockAccountsAdapter) MigrateCodeLeaf(_ vmcommon.AccountHandler) error {
return nil
}

// IsInterfaceNil -
func (m *MockAccountsAdapter) IsInterfaceNil() bool {
return m == nil
Expand Down
2 changes: 2 additions & 0 deletions scenarioexec/gasSchedules/gasScheduleEmbedGenerated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading