Comments (9)
Hi, @meowsbits,
It's been a long time since last update. SSVM released 0.5.0 just now. In this release, we've resolved all issues. Please update to our latest commit and try again. Thanks 😊
from core-geth.
Update:
https://gist.github.com/hydai/5f9bbbcb7a1227e3e0f55fe00f110e23
It looks like SSVM get lots of wasm module instantiation errors. Please give me a moment to analyze these wasm bytecode.
from core-geth.
Update:
You can check out to our master branch to get the latest code.
Git Head: [ master
] ( 8631d4606531981524b347ebb72291cd0b343ab0
).
Although we've fixed several issues, SSVM still failed on 8 test cases. Luckily, all of these 8 test cases will not create segmentation faults. We are going to the remaining issues in a few weeks.
Commit of fixing | Passed | Crashed | Failed |
---|---|---|---|
Original | 46 | 8 | 172 |
Delete cost table of wasm instructions in ewasm mode. | 103 (+57) | 8 | 115 (-57) |
Fix EEI function signature error. | 103 | 8 | 115 |
Fix bytecode not set into the ewasm environment. | 103 | 8 | 115 |
Complete function import matching. | 172 (+69) | 8 | 46 (-69) |
Fix state error when call function failed in VM. | 175 (+3) | 8 | 43 (-3) |
Change out-of-gas case to fail rather than revert. | 180 (+5) | 8 | 38 (-5) |
Fix error of return value in Call() related EEI functions. | 198 (+18) | 15 (+7) | 13 (-25) |
Fix memory resizing policy and bound checking in the memory instance. | 198 | 15 | 13 |
Add memory bound checking when loading or storing values from memory in EEI functions. | 216 (+18) | 0 (-15) | 10 (-3) |
Add lost checking of flag in StorageStore(). | 217 (+1) | 0 | 9 (-1) |
Handle overflow of uint128 loading and storing. | 218 (+1) | 0 | 8 (-1) |
from core-geth.
Issue indeed resolved with SSVM's 0.5.0
! 🎉 See 8354c39.
from core-geth.
With the latest updates in #57 (as of c93eb46), I have:
Hera fails two tests
st.whitelist(`^stEWASM`)
if strings.Contains(*testEWASM, "hera") {
st.skipLoad(`^stEWASMTests/callSenderBalanceExceeds128Bits`)
st.skipLoad(`^stEWASMTests/ecAddCallDataCopy`)
SSVM seems to fail some (I'm having a tough time isolating the failed test(s)...), but when running the suite continually causes a fatal error: unexpected signal during runtime execution
.
> cat .ia/test-ewasm.sh
#!/usr/bin/env bash
SO_SSVM=/home/ia/dev/second-state/SSVM/build/tools/ssvm-evmc/libssvmEVMC.so
SO_HERA=/home/ia/dev/ewasm/hera/build/src/libhera.so
SO_PATH=''
if [[ $1 = ssvm ]]; then
SO_PATH="$SO_SSVM"
elif [[ $1 = hera ]]; then
SO_PATH="$SO_HERA"
fi
[[ -z "$SO_PATH" ]] && echo "Use 'hera' or 'ssvm' as arg1" && exit 1
echo "Running EWASM tests for $SO_PATH"
echo '> go test -v ./tests/... -run TestState -evmc.ewasm='"$SO_PATH" | tee test.$1.log
go test -v ./tests/... -run TestState -evmc.ewasm="$SO_PATH" &> test.$1.log
echo "=> test.$1.log"
# grep -A2 FAIL test.*.log
# grep -B5 -A5 'segementation violation' test.*.log
> t=ssvm; ./.ia/test-ewasm.sh $t; grep -B 10 -A 10 -E '(fatal|FAIL)' test.$t.log || tail -20 test.$t.log
Running EWASM tests for /home/ia/dev/second-state/SSVM/build/tools/ssvm-evmc/libssvmEVMC.so
> go test -v ./tests/... -run TestState -evmc.ewasm=/home/ia/dev/second-state/SSVM/build/tools/ssvm-evmc/libssvmEVMC.so
=> test.ssvm.log
================= Statistics =================
Total execution time: 14 us
Wasm instructions execution time: 5 us
Host functions execution time: 9 us
Executed wasm instructions count: 19
Gas costs: 21508
Instructions per second: 3800000
usedGas: 21508
return_size: 0
return_data:
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x7fb88400a31f pc=0x7fb7b46adc40]
runtime stack:
runtime.throw(0xa80101, 0x2a)
/home/ia/go1.13.5.linux-amd64/go/src/runtime/panic.go:774 +0x72
runtime.sigpanic()
/home/ia/go1.13.5.linux-amd64/go/src/runtime/signal_unix.go:378 +0x47c
goroutine 5229 [syscall]:
runtime.cgocall(0x91c7c0, 0xc0009ef640, 0x40faa4)
--
created by testing.(*T).Run
/home/ia/go1.13.5.linux-amd64/go/src/testing/testing.go:960 +0x350
goroutine 774 [chan send]:
testing.tRunner.func1(0xc00054c700)
/home/ia/go1.13.5.linux-amd64/go/src/testing/testing.go:904 +0x282
testing.tRunner(0xc00054c700, 0xc000541900)
/home/ia/go1.13.5.linux-amd64/go/src/testing/testing.go:913 +0xd3
created by testing.(*T).Run
/home/ia/go1.13.5.linux-amd64/go/src/testing/testing.go:960 +0x350
FAIL github.com/ethereum/go-ethereum/tests 1.703s
? github.com/ethereum/go-ethereum/tests/fuzzers/keystore [no test files]
? github.com/ethereum/go-ethereum/tests/fuzzers/rlp [no test files]
? github.com/ethereum/go-ethereum/tests/fuzzers/trie [no test files]
? github.com/ethereum/go-ethereum/tests/fuzzers/txfetcher [no test files]
? github.com/ethereum/go-ethereum/tests/fuzzers/whisperv6 [no test files]
FAIL
> ^ssvm^hera^
t=hera; ./.ia/test-ewasm.sh $t; grep -B 10 -A 10 -E '(fatal|FAIL)' test.$t.log || tail -20 test.$t.log
Running EWASM tests for /home/ia/dev/ewasm/hera/build/src/libhera.so
> go test -v ./tests/... -run TestState -evmc.ewasm=/home/ia/dev/ewasm/hera/build/src/libhera.so
=> test.hera.log
--- PASS: TestState/stEWASMTests/createNonzero.json/Byzantium/0 (0.01s)
--- PASS: TestState/stEWASMTests/validateBytecodeInvalidImportIsInvalid.json (0.00s)
--- PASS: TestState/stEWASMTests/validateBytecodeInvalidImportIsInvalid.json/Byzantium/0 (0.00s)
--- PASS: TestState/stEWASMTests/validateBytecodeInvalidImportFromTxIsInvalid.json (0.00s)
--- PASS: TestState/stEWASMTests/validateBytecodeInvalidImportFromTxIsInvalid.json/Byzantium/0 (0.00s)
--- PASS: TestState/stEWASMTests/validateBytecodeEmptyInitFromTxIsInvalid.json (0.00s)
--- PASS: TestState/stEWASMTests/validateBytecodeEmptyInitFromTxIsInvalid.json/Byzantium/0 (0.00s)
--- PASS: TestState/stEWASMTests/validateBytecodeEmptyInitIsInvalid.json (0.00s)
--- PASS: TestState/stEWASMTests/validateBytecodeEmptyInitIsInvalid.json/Byzantium/0 (0.00s)
--- PASS: TestState/stEWASMTests/createFromTransactionExceedGasLimit.json (0.00s)
--- PASS: TestState/stEWASMTests/createFromTransactionExceedGasLimit.json/Byzantium/0 (0.00s)
--- PASS: TestState/stEWASMTests/callDepth.json (0.07s)
--- PASS: TestState/stEWASMTests/callDepth.json/Byzantium/0 (0.07s)
PASS
ok github.com/ethereum/go-ethereum/tests 0.302s
? github.com/ethereum/go-ethereum/tests/fuzzers/keystore [no test files]
? github.com/ethereum/go-ethereum/tests/fuzzers/rlp [no test files]
? github.com/ethereum/go-ethereum/tests/fuzzers/trie [no test files]
? github.com/ethereum/go-ethereum/tests/fuzzers/txfetcher [no test files]
? github.com/ethereum/go-ethereum/tests/fuzzers/whisperv6 [no test files]
from core-geth.
As of 88f5c66, there's a way to run the test (files) individually with the --evmc.ewasm=/path/to/ewasm.so
flag. #57 (comment)
from core-geth.
#!/usr/bin/env bash
ewasm_sos=(
/home/ia/dev/second-state/SSVM/build/tools/ssvm-evmc/libssvmEVMC.so
/home/ia/dev/ewasm/hera/build/src/libhera.so
)
set -e
make evmc
make all
set +e
find tests/testdata/GeneralStateTests/stEWASMTests -type f -name '*json' | while read -r line; do
for so in "${ewasm_sos[@]}"; do
resdir="test-ewasm-results/$(basename $so)"
mkdir -p "$resdir"
./build/bin/evm --debug --dump --verbosity 2 statetest --evmc.ewasm="$so" "$line" |& tee "$resdir/$(basename $line)"
done
done
for so in "${ewasm_sos[@]}"; do
resfile="test-ewasm-results/batch"
mkdir -p "$resfile"
resfile="${resfile}/$(basename $so)"
go test -v ./tests/ -run TestState -evmc.ewasm="${so}" ./tests |& tee "$resfile"
done
from core-geth.
As of fc424d7, all tests are passing with Hera.
But something is still clearly broken for SSVM, eg.
> ag panic test-ewasm-results/
libssvmEVMC.so/callStaticVeryLong.json
13: /home/ia/go1.13.5.linux-amd64/go/src/runtime/panic.go:774 +0x72
14:runtime.sigpanic()
Run the script above to reproduce failures on a test-by-test basis.
@dm4 Can you give a hand here?
from core-geth.
Hi, @me020523
I am reproducing this issue and trying to fix SSVM in these test cases.
from core-geth.
Related Issues (20)
- Iris (v1.12.11) Fatal: Failed to start mining: ether base missing: ether base must be explicitly specified HOT 3
- Synchronisation failed, dropping peer err=timeout Iris (v1.12.11) HOT 2
- Mordor Testnet Synchronisation failed HOT 6
- Poseidon (v1.12.14) Make geth failure.
- My nodes are unable to synchronize HOT 4
- Recommended to use fork-diff for the transparent view with upstream geth HOT 1
- Could you please confirm whether it is mandatory to update to the latest release, Real Eris (v1.12.16), or if the previous version is sufficient for the mainet client? HOT 2
- Node does not commit new sealing work when it should HOT 3
- Probably on my end, can't seem to find any solutions for restoring the missing dependancy HOT 2
- Adjust Default Mordor gas limit from 30M to 8M to match Mainnet limits
- deactivate MESS on Mordor HOT 2
- only audit ETC-relevant bootnodes
- Why was UDP closed in the latest update? HOT 9
- Synchronisation failed HOT 10
- Bootloader nodes with DNS off will stop nodes the moment of reading. HOT 4
- dumpconfig creates an invalid config.toml (ECBP1100 cannot umarshal <nil> into a *big.Int) HOT 1
- Synchronisation failed-Persiphone (v1.12.19) HOT 20
- unreachable bootloaders stop node process HOT 4
- fatal error: index out of range HOT 4
- BUG: Wrong Use of local private IP(192.168.x.x) as fromIP in Ping message of Node Discovery Protocol
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core-geth.