aergo icon indicating copy to clipboard operation
aergo copied to clipboard

disable some lua functions

Open kroggen opened this issue 9 months ago • 3 comments

This PR removes some Lua functions, starting on hardfork 4:

  • package module
  • require
  • getfenv
  • setfenv
  • getmetatable
  • setmetatable
  • rawget
  • rawset
  • rawequal
  • string.dump

They continue existing for previous hardforks for compatibility with gas computations. The first 4 are also available when Aergo is build in debug mode

This PR also does not build some disabled packages (os, io, jit, debug) and so the code cannot be accessed in any way

It includes tests to make sure the disabled modules and functions are not available

kroggen avatar Oct 31 '23 01:10 kroggen