Skip to content

v0.7.1

Compare
Choose a tag to compare
@sorpaas sorpaas released this 14 Sep 15:37
· 278 commits to master since this release

Published crates:

sputnikvm = "0.7.1"
sputnikvm-stateful = "v0.7.0"

Namespace Changes

The old sputnikvm::vm namespace is now moved to top level sputnikvm. If you are upgrading from a previous version, you will need to change your imports and uses accordingly. The top level re-exports are now removed. Please use the original crates etcommon-bigint and etcommon-hexutil for its functionality.

New Patch Design

Patch is changed from a struct to a trait. So there is no need to pass around a patch object when invoking the VM. Instead, you can specify the patch directly in the VM type like this SeqTransactionVM<EIP160Patch>.

Right now you can also define your own precompiled contracts. To do this, implement your own Precompiled. Given a data, it should determine the return value as well as the gas used. Then you can add this in a customized Patch::precompileds() function. This function returns a static slice, where for each item, the first value is the address of the precompiled contract, the second value is the required code in the account, and the third value is the Precompiled.

This interface also adds basic support for Adding Precompiled Contracts without Hard Forks.

Note that the precompiled contract interface might go through changes in release range 0.7. So please pin the patch version if needed.