From d4543239d7ce47164cca52590572942d3e10c2d0 Mon Sep 17 00:00:00 2001 From: tersec Date: Tue, 12 Sep 2023 15:03:18 +0000 Subject: [PATCH] rm state_sim WASM wrapper/demo (#5421) --- wasm/README.md | 4 +- wasm/build.sh | 35 ----------- wasm/index.html | 71 ---------------------- wasm/index_state_sim.html | 71 ---------------------- wasm/state_sim_shell.html | 124 -------------------------------------- 5 files changed, 2 insertions(+), 303 deletions(-) delete mode 100755 wasm/build.sh delete mode 100644 wasm/index.html delete mode 100644 wasm/index_state_sim.html delete mode 100644 wasm/state_sim_shell.html diff --git a/wasm/README.md b/wasm/README.md index eac8ff00e..1dba498d7 100644 --- a/wasm/README.md +++ b/wasm/README.md @@ -1,11 +1,11 @@ -# Run nimbus state sim in a browser +# Run nimbus ncli in a browser Simple runners for in-browser running of WASM versions of applications - based on emscripten-generated code. ``` # Make sure you have built nimbus-eth2 with make first! -./build.sh +./build_ncli.sh # Run a http server here (wasm + file:/// apparently don't mix) python -m SimpleHTTPServer diff --git a/wasm/build.sh b/wasm/build.sh deleted file mode 100755 index 2aa8612cf..000000000 --- a/wasm/build.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -# Simple build script to produce an Emscripten-based wasm version of the state -# sim. -# Assumes you have emcc latest-upstream in you PATH, per their install -# instructions (https://emscripten.org/docs/getting_started/downloads.html) -# -# git clone https://github.com/emscripten-core/emsdk.git -# cd emsdk -# git pull -# ./emsdk install latest-upstream -# ./emsdk activate latest-upstream -# source ./emsdk_env.sh - -# Clean build every time - we use wildcards below so this keeps it simple -rm -rf state_sim/nimcache - -# GC + emcc optimizer leads to crashes - for now, we disable the GC here -../env.sh nim c \ - --cpu:i386 --os:linux --gc:none --threads:off \ - -d:release -d:clang -d:emscripten -d:noSignalHandler -d:usemalloc \ - --nimcache:state_sim/nimcache \ - -c ../research/state_sim.nim - -../env.sh emcc \ - -I ../vendor/nimbus-build-system/vendor/Nim/lib \ - state_sim/nimcache/*.c \ - ../vendor/nim-blscurve/blscurve/csources/32/{big_384_29.c,ecp2_BLS381.c,rom_curve_BLS381.c,ecp_BLS381.c,fp2_BLS381.c,fp_BLS381.c,rom_field_BLS381.c,pair_BLS381.c,fp12_BLS381.c,fp4_BLS381.c} \ - -s ERROR_ON_UNDEFINED_SYMBOLS=0 \ - -s TOTAL_MEMORY=1073741824 \ - -s EXTRA_EXPORTED_RUNTIME_METHODS=FS \ - -s WASM=1 \ - --shell-file state_sim_shell.html \ - -O3 \ - -o state_sim/state_sim.html diff --git a/wasm/index.html b/wasm/index.html deleted file mode 100644 index 5c2063c4c..000000000 --- a/wasm/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - Nimbus tooling - - - -
-
-

Ethereum Beacon Chain state transition simulation (unoptimized work in progress, you might run out of memory)

-
- - - - - - - - - - - - - -
Create / Validate BLS signaturesValidatorsSlotsAttestation ratio
true false
- -
-
- -
- - \ No newline at end of file diff --git a/wasm/index_state_sim.html b/wasm/index_state_sim.html deleted file mode 100644 index d40402735..000000000 --- a/wasm/index_state_sim.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - Nimbus State Sim - - - -
-
-

Ethereum Beacon Chain state transition simulation (unoptimized work in progress, you might run out of memory)

-
- - - - - - - - - - - - - -
Create / Validate BLS signaturesValidatorsSlotsAttestation ratio
true false
- -
-
- -
- - \ No newline at end of file diff --git a/wasm/state_sim_shell.html b/wasm/state_sim_shell.html deleted file mode 100644 index 8e3800efe..000000000 --- a/wasm/state_sim_shell.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - Nimbus state transition function - - - - -
-
Running...
-
-
- - - {{{ SCRIPT }}} - - - \ No newline at end of file