Skip to content

AVM 2.0 release

Latest
Compare
Choose a tag to compare
@jeff-aion jeff-aion released this 27 Oct 21:24
· 18 commits to master since this release

This marks the first AVM 2 release. NOTE: AVM 2.x is not consensus-compatible with AVM 1.x! Contracts deployed on AVM 1.x will be retransformed for AVM 2, upon first transaction invocation.

Noteworthy changes:

  • Removed inappropriate methods from StringBuffer (buffer size changes) and String (regex uses)
  • Changed JCL billing mechanism to avoid double-billing and align costs more closely with real expense of these operations (in the majority of cases, this reduced the JCL energy cost)
  • Added restrictions to what is considered a valid contract:
    • no more than 4095 constant pool entries per class
    • no more than 511 methods per class
    • no more than 63 local variables in a method
    • no more than 63 operand stack slots per method
    • no more than 15 exception handlers per method
    • no more than 4095 bytes of code per method
  • Added diagnostic utilities to collect data around deployed contracts
  • Fixed double-increment of nonce in some cases
  • Fixed the energy cost of heap usage: this is now directly associated with the instance variables in an object
  • Fixed a bug where a reverted transaction would over-charge the sender
  • Added meta-transaction support via Blockchain.invokeTransaction
  • Added ability API to get the hash of the current external transaction via Blockchain.getTransactionHash