gear icon indicating copy to clipboard operation
gear copied to clipboard

remove all deprecated code from lazy-pages and runtime interface before standalone net release

Open grishasobol opened this issue 3 years ago • 3 comments

File Location(s)

No response

Proposal

To support old runtimes in test-net and workshop-net we need to keep deprecated code in gear-lazy-pages and gear-runtime-interface packages. You need to remove all this code after we will skip all old block-chains and create new one release network

grishasobol avatar Jul 05 '22 11:07 grishasobol

Also add new errors in RIError (we cannot add nothing currently by the same reason - RIError must be the same for old runtimes)

grishasobol avatar Jul 05 '22 11:07 grishasobol

Also add new errors in RIError (we cannot add nothing currently by the same reason - RIError must be the same for old runtimes)

As practices shows, that not good idea to return errors from RI, because:

  1. Most errors should lead to panic of current block finalisation process. It is errors, which is caused by OS work part, and their result must not be fixed in block chain.
  2. Returning errors cause deprecated code generation each time we want to add some error case or change something in RI. There is no such problem with panics in RI. All checks must be done in runtime before calling RI function

grishasobol avatar Aug 08 '22 15:08 grishasobol

Also must remove patch from #1317

grishasobol avatar Aug 15 '22 18:08 grishasobol

Fixed in https://github.com/gear-tech/gear/pull/1386 / https://github.com/gear-tech/gear/pull/1371

shamilsan avatar Sep 26 '22 13:09 shamilsan