core: adjust prices for blockchain/contract syscalls

This commit is contained in:
Evgenii Stratonikov 2020-06-16 11:05:03 +03:00
parent 3cb3c95aff
commit b1d2d70c02

View file

@ -71,25 +71,25 @@ func getInteropFromSlice(ic *interop.Context, slice []interop.Function) func(uin
var systemInterops = []interop.Function{ var systemInterops = []interop.Function{
{Name: "System.Binary.Deserialize", Func: runtimeDeserialize, Price: 500000}, {Name: "System.Binary.Deserialize", Func: runtimeDeserialize, Price: 500000},
{Name: "System.Binary.Serialize", Func: runtimeSerialize, Price: 100000}, {Name: "System.Binary.Serialize", Func: runtimeSerialize, Price: 100000},
{Name: "System.Blockchain.GetBlock", Func: bcGetBlock, Price: 250, {Name: "System.Blockchain.GetBlock", Func: bcGetBlock, Price: 2500000,
AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates}, AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates},
{Name: "System.Blockchain.GetContract", Func: bcGetContract, Price: 100, {Name: "System.Blockchain.GetContract", Func: bcGetContract, Price: 1000000,
AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates}, AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates},
{Name: "System.Blockchain.GetHeight", Func: bcGetHeight, Price: 1, {Name: "System.Blockchain.GetHeight", Func: bcGetHeight, Price: 400,
AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates}, AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates},
{Name: "System.Blockchain.GetTransaction", Func: bcGetTransaction, Price: 100, {Name: "System.Blockchain.GetTransaction", Func: bcGetTransaction, Price: 1000000,
AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates}, AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates},
{Name: "System.Blockchain.GetTransactionFromBlock", Func: bcGetTransactionFromBlock, Price: 100, {Name: "System.Blockchain.GetTransactionFromBlock", Func: bcGetTransactionFromBlock, Price: 1000000,
AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates}, AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates},
{Name: "System.Blockchain.GetTransactionHeight", Func: bcGetTransactionHeight, Price: 100, {Name: "System.Blockchain.GetTransactionHeight", Func: bcGetTransactionHeight, Price: 1000000,
AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates}, AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowStates},
{Name: "System.Contract.Call", Func: contractCall, Price: 1, {Name: "System.Contract.Call", Func: contractCall, Price: 1000000,
AllowedTriggers: trigger.System | trigger.Application, RequiredFlags: smartcontract.AllowCall}, AllowedTriggers: trigger.System | trigger.Application, RequiredFlags: smartcontract.AllowCall},
{Name: "System.Contract.CallEx", Func: contractCallEx, Price: 1, {Name: "System.Contract.CallEx", Func: contractCallEx, Price: 1000000,
AllowedTriggers: trigger.System | trigger.Application, RequiredFlags: smartcontract.AllowCall}, AllowedTriggers: trigger.System | trigger.Application, RequiredFlags: smartcontract.AllowCall},
{Name: "System.Contract.Create", Func: contractCreate, Price: 0, {Name: "System.Contract.Create", Func: contractCreate, Price: 0,
AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowModifyStates}, AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowModifyStates},
{Name: "System.Contract.Destroy", Func: contractDestroy, Price: 1, {Name: "System.Contract.Destroy", Func: contractDestroy, Price: 1000000,
AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowModifyStates}, AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowModifyStates},
{Name: "System.Contract.Update", Func: contractUpdate, Price: 0, {Name: "System.Contract.Update", Func: contractUpdate, Price: 0,
AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowModifyStates}, AllowedTriggers: trigger.Application, RequiredFlags: smartcontract.AllowModifyStates},