ICON 2.0 SCORE fee policy update draft proposal

Hi everyone.

There are two major problems in ICON1 that must be solved at the launch of ICON 2.0.

  1. Runtime step costing
  2. Deployment step costing

We propose to apply the following modification in the step costing calculation. Those changes are still a work in progress, but we want to the developer community feedback on this as soon as possible.

Please let us know you thoughts about those changes. We would like to submit a network proposal by August 2nd.


GET

Introduce Step cost for ‘get’ along with the concept of ‘defaultGet’.

  • Costget() = DEFAULT_GET + sizeof() * GET
  • GET should be non-zero value (we need to decide the proper number of this)

DEFAULT_GET is needed as many MPT node traversals (i.e. Disk I/O) should be involved to reach the leaf node that contains .

SET

Also introduce the ‘defaultSet’ concept.

  • Costset(, ) = DEFAULT_SET + sizeof() * SET
  • Adding a new key/value entry is more expensive operation than updating an already existing key/value entry because the former increases overall indexing data size.

REPLACE

Also introduce the ‘defaultReplace’ concept.

  • Costreplace(, , )
    = DEFAULT_REPLACE + sizeof() * SET + sizeof() * DELETE

  • DEFAULT_REPLACE = (DEFAULT_SET + DEFAULT_DELETE) / 2

  • Apply different Step costing for and values in order to prevent illegal Step earning

DELETE

Also introduce the ‘defaultDelete’ concept.

  • Costdelete() = DEFAULT_DELETE + sizeof() * DELETE

EVENTLOG

Also introduce the ‘defaultEvent’ concept.

Costevent(,) = DEFAULT_EVENTLOG + sizeof(<indexed|data>) * EVENTLOG

Summary


CONTRACTUPDATE

Adjust to have the same value as ‘contractInstall’. There is no longer need to differentiate between install and update. Rather, updating the existing SCOREs are preferable on ICON2 since it does not increase a leaf node of account MPT.

CONTRACTSET

Reduce the value to 23,000 from 30,000. Together with the change ‘contractUpdate’ above, this will make the maximum code size around 64 KB for both Install and Update.


Thank you.

4 Likes

Is it a positive or negative cost for delete operation?

DELETE cost is negative. This is same as the current step cost.

1 Like