qtumproject / cpp-eth-qtum

GNU General Public License v3.0
9 stars 48 forks source link

Add EVM and OP_CREATE for contract execution (Qtum Core / QTUMCORE-3) #1

Closed designsters closed 7 years ago

designsters commented 7 years ago

After this story, the EVM should be integrated and a very basic contract should be capable of being executed. There will be a new opcode, OP_CREATE (formerly OP_EXEC), which takes 4 arguments, in push order:

  1. VM version (currently 1 is EVM)
  2. Gas price (not yet used, anything is valid)
  3. Gas limit (not yet used, assume very high limit)
  4. bytecode

For now it is OK that this script format be forced and mandatory for OP_CREATE transactions on the blockchain. (ie, only "standard" allowed on the blockchain) When OP_CREATE is encountered, it should execute the EVM and persist the contract to a database (triedb) Note: Make sure to follow policy for external code (commit vanilla unmodified code first, and then change it as needed) Make the EVM test suite functional as well (someone else can setup continuous integration changes for it though)

qtum-neil commented 7 years ago

./testeth failing on this branch?