- support storage field on contract
- support storage field to local VM
- support OPcode SSTORE, SLOAD
- support storage 필드 in merkle tree offchain
- support external call(verification of a contract code in offchain)
- support log field in execution state
- verification of ERC-20 contract method(balanceOf)
- verification of ERC-20 contract method(transfer)
- support Account
- support transfer ETH in contract
- support ETH transfer
- implementation of arranging execution steps of CALLER and CALLEE
- implementation of submitting merkle proof for state
- support OPcode CALL
- support OPcode DELEGATECALL
- support OPcode STATICCALL
- support charging UPFRONT COST
- support refunding TX FEE
- support block's reward in case of last transaction
- implementation of compact storage
- implementation of compact return data
- implementation of compact log
- integration with Plasma EVM client(GO porting)
- support OPcode(BALANCE, GASLIMIT, EXTCODESIZE, EXTCODECOPY, EXTCODEHASH, RETURNDATASIZE)
$ git clone https://github.com/Onther-Tech/solEVM.git ./
$ npm install
You can run the tests of verification game :
$ ./scripts/test_geth.sh test/contracts/[Test File].js
If you want to look into more details or debug for development you can do like this :
$ DEBUG=vgame-test ./scripts/test_geth.sh test/contracts/[Test File].js
You can run the test of offchain stepper(Offchain VM) :
$ node test/utils/testStepper.js
You can run the test of offchain stepper when to execute CALL(Offchain VM) :
$ npm run test:utils:call
You can compile all contracts :
$ npm run compile:contracts
describe('Fixture for Dispute/Verifier Logic #1', function () {
const code = ['runtime bytecode'];
const data = ['callData'];
const tStorage = ['0x + hex'];
let steps;
let copy;
let merkle;
const runtime = new HydratedRuntime();
beforeEach(async () => {
steps = await runtime.run({ code, data, pc: 0, tStorage: tStorage });
copy = JSON.stringify(steps);
merkle = new Merkelizer().run(steps, code, data, tStorage);
});
- code [runtime bytecode] - bytes
- data [callData] - bytes
- stack [hex number] - 32bytes
- mem [hex number] - 32bytes
- tStorage [slot, value, slot, value, ...] - 32bytes
Test Files | Case | Pass / Fail / Not Yet |
---|---|---|
dispute.storage.js | OPCODE SLOAD, SSTORE Support |
Pass |
dispute.log.js | OPCODE LOG Support |
Pass |
dispute.balanceOf.js | ERC20 balanceOf Verification |
Pass |
dispute.transfer.js | ERC20 transfer Verification |
Pass |
- | OPCODE CALL, DELEGATECALL, STATICCALL Support |
Not Yet |
- | OPCODE CREATE, CREATE2 Support |
Not Yet |
Case |
---|
both have the same result, solver wins |
challenger has an output error somewhere |
solver has an output error somewhere |
challenger first step missing |
solver first step missing |
challenger last step gone |
solver last step gone |
challenger wrong memory output |
solver wrong memory output |
challenger wrong stack output |
solver wrong stack output |
challenger wrong opcode |
solver wrong opcode |
only two steps, both wrong but doesn\'t end with OP.REVERT or RETURN = challenger wins |
solver misses steps in between |
solver with one invalid step |
challenger with one invalid step |
solver with one invalid step against LOG |
challenger with one invalid step against LOG |