├── src ├── secp256k1 │ ├── obj │ │ └── .gitignore │ ├── autogen.sh │ ├── TODO │ ├── src │ │ ├── modules │ │ │ ├── ecdh │ │ │ │ └── Makefile.am.include │ │ │ └── recovery │ │ │ │ └── Makefile.am.include │ │ ├── java │ │ │ ├── org_bitcoin_Secp256k1Context.c │ │ │ └── org_bitcoin_Secp256k1Context.h │ │ ├── scalar_low.h │ │ ├── ecmult_const.h │ │ ├── num_gmp.h │ │ ├── num_impl.h │ │ ├── scalar_8x32.h │ │ └── scalar_4x64.h │ ├── libsecp256k1.pc.in │ └── .gitignore ├── ripple │ ├── json │ │ ├── impl │ │ │ ├── version │ │ │ └── LICENSE │ │ ├── README.md │ │ └── TODO.md │ ├── net │ │ └── images │ │ │ ├── states.png │ │ │ └── interrupt_sequence.png │ ├── ledger │ │ └── impl │ │ │ └── Tuning.h │ ├── crypto │ │ └── README.md │ ├── proto │ │ ├── README.md │ │ └── org │ │ │ └── zxcl │ │ │ └── rpc │ │ │ └── v1 │ │ │ ├── account.proto │ │ │ └── ledger.proto │ ├── README.md │ ├── app │ │ └── consensus │ │ │ └── README.md │ └── shamap │ │ └── LeafNodeHashCache.h ├── eth │ ├── evmc │ │ ├── CNAME │ │ ├── cmake │ │ │ ├── cable │ │ │ │ ├── .gitignore │ │ │ │ ├── toolchains │ │ │ │ │ ├── default.cmake │ │ │ │ │ ├── cxx14.cmake │ │ │ │ │ ├── cxx17.cmake │ │ │ │ │ ├── cxx11.cmake │ │ │ │ │ ├── cxx14-pic.cmake │ │ │ │ │ ├── cxx17-pic.cmake │ │ │ │ │ ├── cxx11-pic.cmake │ │ │ │ │ ├── cxx14-32bit.cmake │ │ │ │ │ ├── cxx17-32bit.cmake │ │ │ │ │ ├── cxx11-32bit.cmake │ │ │ │ │ ├── cxx11-c99.cmake │ │ │ │ │ ├── cxx11-fpic.cmake │ │ │ │ │ ├── mips64.cmake │ │ │ │ │ └── powerpc64.cmake │ │ │ │ ├── buildinfo │ │ │ │ │ ├── buildinfo.sh.in │ │ │ │ │ ├── buildinfo.ps1.in │ │ │ │ │ ├── buildinfo.json.in │ │ │ │ │ ├── version.h.in │ │ │ │ │ ├── buildinfo.h.in │ │ │ │ │ └── buildinfo.c.in │ │ │ │ └── defaults │ │ │ │ │ └── HunterCacheServers-passwords.cmake │ │ │ ├── Config.cmake.in │ │ │ ├── Hunter │ │ │ │ ├── init.cmake │ │ │ │ └── config.cmake │ │ │ └── EVMC.cmake │ │ ├── .codespell-whitelist │ │ ├── .gitignore │ │ ├── NodeStoreRefactoringCaseStudy.pdf │ │ ├── images │ │ │ └── xrp-text-mark-black-small@2x.png │ │ ├── 0001-negative-unl │ │ │ └── negativeUNL_highLevel_sequence.png │ │ ├── codecov.yml │ │ ├── AUTHORS.md │ │ ├── tools │ │ │ ├── CMakeLists.txt │ │ │ ├── evmc │ │ │ │ └── CMakeLists.txt │ │ │ └── vmtester │ │ │ │ └── vmtester.hpp │ │ ├── Cargo.toml │ │ ├── test │ │ │ ├── CMakeLists.txt │ │ │ ├── compilation │ │ │ │ ├── compilation_test.c │ │ │ │ └── compilation_test.cxx │ │ │ └── tools │ │ │ │ └── CMakeLists.txt │ │ ├── docs │ │ │ ├── custom.dox │ │ │ └── VM_Tester.md │ │ ├── examples │ │ │ ├── use_evmc_in_cmake │ │ │ │ ├── use_evmc_in_cmake.c │ │ │ │ └── CMakeLists.txt │ │ │ ├── use_instructions_in_cmake │ │ │ │ ├── use_instructions_in_cmake.c │ │ │ │ └── CMakeLists.txt │ │ │ ├── example_vm │ │ │ │ ├── example_vm.h │ │ │ │ └── CMakeLists.txt │ │ │ ├── example_precompiles_vm │ │ │ │ └── example_precompiles_vm.h │ │ │ ├── example_host.h │ │ │ └── CMakeLists.txt │ │ ├── lib │ │ │ ├── mocked_host │ │ │ │ └── CMakeLists.txt │ │ │ ├── loader │ │ │ │ └── CMakeLists.txt │ │ │ ├── instructions │ │ │ │ └── CMakeLists.txt │ │ │ └── CMakeLists.txt │ │ ├── .travis.yml │ │ ├── Docker.md │ │ ├── sample_chart.doc │ │ ├── CheatSheet.md │ │ └── include │ │ │ └── evmc │ │ │ └── utils.h │ ├── tools │ │ ├── ripemd160.h │ │ └── FixedHash.cpp │ ├── unity │ │ └── vm_unity.cpp │ ├── vm │ │ ├── VMFactory.h │ │ ├── VMFactory.cpp │ │ └── executor │ │ │ └── interpreter │ │ │ └── interpreter.h │ └── api │ │ └── utils │ │ └── TransactionSkeleton.h ├── intx │ ├── cmake │ │ ├── cable │ │ │ ├── .gitignore │ │ │ ├── toolchains │ │ │ │ ├── default.cmake │ │ │ │ ├── cxx14.cmake │ │ │ │ ├── cxx17.cmake │ │ │ │ ├── cxx11.cmake │ │ │ │ ├── cxx14-pic.cmake │ │ │ │ ├── cxx17-pic.cmake │ │ │ │ ├── cxx11-pic.cmake │ │ │ │ ├── cxx14-32bit.cmake │ │ │ │ ├── cxx17-32bit.cmake │ │ │ │ ├── cxx11-32bit.cmake │ │ │ │ ├── cxx11-c99.cmake │ │ │ │ ├── cxx11-fpic.cmake │ │ │ │ ├── mips64.cmake │ │ │ │ └── powerpc64.cmake │ │ │ ├── buildinfo │ │ │ │ ├── buildinfo.sh.in │ │ │ │ ├── buildinfo.ps1.in │ │ │ │ ├── buildinfo.json.in │ │ │ │ ├── buildinfo.h.in │ │ │ │ └── buildinfo.c.in │ │ │ └── defaults │ │ │ │ └── HunterCacheServers-passwords.cmake │ │ ├── Config.cmake.in │ │ ├── Hunter │ │ │ └── init.cmake │ │ └── FindGMP.cmake │ ├── .gitignore │ ├── pax_global_header │ ├── codecov.yml │ ├── test │ │ ├── integration │ │ │ └── CMakeLists.txt │ │ ├── experimental │ │ │ ├── CMakeLists.txt │ │ │ └── div.hpp │ │ ├── fuzzer │ │ │ └── CMakeLists.txt │ │ ├── unittests │ │ │ ├── test_cases.hpp │ │ │ └── CMakeLists.txt │ │ ├── CMakeLists.txt │ │ └── benchmarks │ │ │ ├── CMakeLists.txt │ │ │ └── bench_builtins.cpp │ ├── examples │ │ └── use_cmake_package │ │ │ ├── use_int128.cpp │ │ │ ├── use_intx.cpp │ │ │ └── CMakeLists.txt │ ├── .bumpversion.cfg │ ├── appveyor.yml │ └── README.md ├── wasmvm │ ├── wasm3 │ │ ├── test │ │ │ ├── wasi │ │ │ │ ├── simple │ │ │ │ │ ├── 0.txt │ │ │ │ │ ├── wasm_api.syms │ │ │ │ │ ├── test.wasm │ │ │ │ │ ├── test-opt.wasm │ │ │ │ │ ├── wasm_api.h │ │ │ │ │ └── README.md │ │ │ │ ├── wasmboy │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── image.png │ │ │ │ │ └── wasmerboy.wasm │ │ │ │ ├── mal │ │ │ │ │ ├── .gitattributes │ │ │ │ │ ├── mal.wasm │ │ │ │ │ ├── test-fib.mal │ │ │ │ │ ├── README.md │ │ │ │ │ └── env.mal │ │ │ │ ├── coremark │ │ │ │ │ ├── README.md │ │ │ │ │ ├── coremark.wasm │ │ │ │ │ └── coremark-minimal.wasm │ │ │ │ ├── c-ray │ │ │ │ │ ├── scene.jpg │ │ │ │ │ ├── c-ray.wasm │ │ │ │ │ ├── sphfract.jpg │ │ │ │ │ └── scene │ │ │ │ ├── smallpt │ │ │ │ │ ├── image.jpg │ │ │ │ │ ├── smallpt.wasm │ │ │ │ │ ├── smallpt-ex.wasm │ │ │ │ │ └── smallpt-ex-mv.wasm │ │ │ │ ├── brotli │ │ │ │ │ ├── brotli.wasm │ │ │ │ │ └── alice29.txt.compressed │ │ │ │ ├── mandelbrot │ │ │ │ │ ├── image.png │ │ │ │ │ ├── mandel.wasm │ │ │ │ │ └── mandel_dd.wasm │ │ │ │ ├── stream │ │ │ │ │ └── stream.wasm │ │ │ │ ├── wasmsynth │ │ │ │ │ ├── image.png │ │ │ │ │ ├── wasm-song.wasm │ │ │ │ │ ├── hondarribia.wasm │ │ │ │ │ ├── shuffle-chill.wasm │ │ │ │ │ └── webchip-music.wasm │ │ │ │ └── raymarcher │ │ │ │ │ └── raymarcher.wasm │ │ │ ├── lang │ │ │ │ ├── fib32.wasm │ │ │ │ ├── fib64.wasm │ │ │ │ ├── fib.c.wasm │ │ │ │ ├── fib32_tail.wasm │ │ │ │ ├── fib.min.js │ │ │ │ ├── fib.walt │ │ │ │ ├── fib.py │ │ │ │ ├── fib.js │ │ │ │ ├── fib.lua │ │ │ │ ├── fib32.wat │ │ │ │ ├── fib64.wat │ │ │ │ ├── fib32_tail.wat │ │ │ │ ├── fib.c │ │ │ │ └── README.md │ │ │ ├── fuzz │ │ │ │ └── corpus │ │ │ │ │ ├── fib32.wasm │ │ │ │ │ ├── fib64.wasm │ │ │ │ │ ├── fib32_tail.wasm │ │ │ │ │ ├── fib64_tail.wasm │ │ │ │ │ └── fib.c.wasm │ │ │ └── self-hosting │ │ │ │ └── wasm3-fib.wasm │ │ ├── platforms │ │ │ ├── embedded │ │ │ │ ├── arduino │ │ │ │ │ ├── .gitignore │ │ │ │ │ └── lib │ │ │ │ │ │ └── wasm3 │ │ │ │ ├── esp8266 │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── lib │ │ │ │ │ │ └── wasm3 │ │ │ │ │ └── platformio.ini │ │ │ │ ├── hifive1 │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── lib │ │ │ │ │ │ └── wasm3 │ │ │ │ │ ├── README.md │ │ │ │ │ └── platformio.ini │ │ │ │ ├── bluepill │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── lib │ │ │ │ │ │ └── wasm3 │ │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ ├── src 2 │ │ │ │ │ │ │ └── library.json │ │ │ │ │ └── platformio.ini │ │ │ │ ├── esp32-pio │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── lib │ │ │ │ │ │ └── wasm3 │ │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ └── library.json │ │ │ │ │ └── platformio.ini │ │ │ │ ├── fomu │ │ │ │ │ ├── src │ │ │ │ │ │ ├── wasm3 │ │ │ │ │ │ └── time.c │ │ │ │ │ ├── ld │ │ │ │ │ │ ├── output_format.ld │ │ │ │ │ │ └── regions.ld │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── gdb_init │ │ │ │ │ ├── include │ │ │ │ │ │ ├── csr-defs.h │ │ │ │ │ │ ├── time.h │ │ │ │ │ │ ├── crc.h │ │ │ │ │ │ ├── spiflash.h │ │ │ │ │ │ ├── generated │ │ │ │ │ │ │ └── mem.h │ │ │ │ │ │ ├── console.h │ │ │ │ │ │ ├── rgb.h │ │ │ │ │ │ └── usb.h │ │ │ │ │ ├── .env │ │ │ │ │ └── README.md │ │ │ │ ├── particle │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── project.properties │ │ │ │ │ ├── lib │ │ │ │ │ │ └── wasm3 │ │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ └── library.properties │ │ │ │ │ └── README.md │ │ │ │ ├── wm_w600 │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── wasm3 │ │ │ │ │ └── README.md │ │ │ │ ├── esp32-idf-wasi │ │ │ │ │ ├── main │ │ │ │ │ │ ├── wasm3 │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── m3_api_esp_wasi.h │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── .old │ │ │ │ │ │ ├── component.mk │ │ │ │ │ │ └── Makefile │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── sdkconfig.defaults │ │ │ │ │ └── README.md │ │ │ │ └── esp32-idf │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── main │ │ │ │ │ ├── linker.lf │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ ├── .old │ │ │ │ │ ├── component.mk │ │ │ │ │ └── Makefile │ │ │ │ │ ├── sdkconfig.defaults │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── README.md │ │ │ ├── android │ │ │ │ ├── settings.gradle │ │ │ │ ├── app │ │ │ │ │ ├── src │ │ │ │ │ │ └── main │ │ │ │ │ │ │ ├── cpp │ │ │ │ │ │ │ ├── m3 │ │ │ │ │ │ │ ├── m3 2 │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ │ ├── res │ │ │ │ │ │ │ ├── values │ │ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ │ │ ├── dimens.xml │ │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ │ ├── drawable │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ │ │ │ └── ic_launcher.xml │ │ │ │ │ │ │ └── values-w820dp │ │ │ │ │ │ │ │ └── dimens.xml │ │ │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ │ └── proguard-rules.pro │ │ │ │ ├── .gitignore │ │ │ │ ├── gradle │ │ │ │ │ └── wrapper │ │ │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ │ │ └── gradle-wrapper.properties │ │ │ │ ├── README.md │ │ │ │ ├── gradle.properties │ │ │ │ └── override.txt │ │ │ ├── cpp │ │ │ │ ├── .gitignore │ │ │ │ ├── wasm │ │ │ │ │ ├── test_prog.wasm │ │ │ │ │ ├── Makefile │ │ │ │ │ └── test_prog.c │ │ │ │ ├── wasm3_cpp │ │ │ │ │ └── CMakeLists.txt │ │ │ │ └── CMakeLists.txt │ │ │ ├── ios │ │ │ │ ├── .gitignore │ │ │ │ ├── wasm3 │ │ │ │ │ ├── icon.png │ │ │ │ │ ├── Bridging-Header.h │ │ │ │ │ └── ViewController.swift │ │ │ │ ├── wasm3.xcodeproj │ │ │ │ │ └── project.xcworkspace │ │ │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ │ │ └── xcshareddata │ │ │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ │ └── README.md │ │ │ ├── cosmopolitan │ │ │ │ └── .gitignore │ │ │ ├── app │ │ │ │ └── README.md │ │ │ ├── python │ │ │ │ └── README.md │ │ │ ├── openwrt │ │ │ │ └── README.md │ │ │ ├── emscripten_lib │ │ │ │ └── run_native.js │ │ │ └── emscripten │ │ │ │ └── README.md │ │ ├── extra │ │ │ ├── blynk.png │ │ │ ├── logo.png │ │ │ ├── button.png │ │ │ ├── wowcube.png │ │ │ ├── scailable.png │ │ │ ├── screenshot-ios.png │ │ │ ├── screenshot-android.png │ │ │ ├── disasm-func.sh │ │ │ └── wapm-package │ │ │ │ └── wapm.toml │ │ ├── source │ │ │ ├── m3_exec.c │ │ │ ├── m3_api_tracer.h │ │ │ ├── m3_api_libc.h │ │ │ ├── m3_bind.h │ │ │ ├── extra │ │ │ │ ├── fib32.wasm.h │ │ │ │ ├── fib64.wasm.h │ │ │ │ └── fib32_tail.wasm.h │ │ │ └── m3_api_wasi.h │ │ ├── .gitignore │ │ └── docs │ │ │ └── Installation.md │ ├── README.md │ ├── contract │ │ └── math │ │ │ ├── math.wasm │ │ │ ├── math.cc │ │ │ └── math.h │ ├── CMakeLists.txt │ ├── common │ │ └── check.h │ ├── vm │ │ ├── impl │ │ │ └── chainsqlWasmVm.cc │ │ ├── CMakeLists.txt │ │ ├── action.h │ │ └── tests │ │ │ └── testAction.cc │ └── example │ │ └── CMakeLists.txt ├── ed25519-donna │ ├── fuzz │ │ ├── ed25519-donna.c │ │ ├── ed25519-donna-sse2.c │ │ ├── curve25519-ref10.h │ │ └── ed25519-ref10.h │ ├── ed25519-randombytes-custom.h │ └── ed25519-hash-custom.h ├── test │ ├── csf │ │ ├── csf_graph.png │ │ └── csf_overview.png │ └── app │ │ └── Transaction2Sql_test.cpp ├── peersafe │ ├── gmencrypt │ │ └── randomcheck │ │ │ ├── ini.h │ │ │ ├── log.h │ │ │ └── swsds.h │ ├── app │ │ ├── tx │ │ │ ├── impl │ │ │ │ └── AccountAuthorize.cpp │ │ │ └── OperationRule.h │ │ ├── bloom │ │ │ ├── BloomHelper.h │ │ │ ├── Bloom.h │ │ │ └── FilterHelper.h │ │ └── table │ │ │ └── TokenProcess.h │ ├── consensus │ │ ├── hotstuff │ │ │ └── impl │ │ │ │ ├── NetWork.h │ │ │ │ ├── BlockStorage.h │ │ │ │ └── BlockStorage.cpp │ │ └── rpca │ │ │ └── README.md │ ├── rpc │ │ └── handlers │ │ │ └── AccountAuthorized.cpp │ ├── unity │ │ ├── app_sql.cpp │ │ ├── app_schema.cpp │ │ ├── app_contract.cpp │ │ ├── gm_encrypt.cpp │ │ └── app_table.cpp │ ├── crypto │ │ ├── LibSnark.h │ │ └── impl │ │ │ └── sha3.cpp │ └── precompiled │ │ ├── Define.h │ │ ├── ToolsPrecompiled.h │ │ ├── TableOpPrecompiled.h │ │ └── Utils.h └── beast │ └── extras │ ├── README.md │ └── beast │ └── test │ └── sig_wait.hpp ├── Builds ├── containers │ ├── packaging │ │ ├── dpkg │ │ │ └── debian │ │ │ │ ├── compat │ │ │ │ ├── source │ │ │ │ ├── format │ │ │ │ └── local-options │ │ │ │ ├── docs │ │ │ │ ├── dirs │ │ │ │ ├── rippled-dev.install │ │ │ │ ├── conffiles │ │ │ │ ├── README.Debian │ │ │ │ ├── rippled.links │ │ │ │ ├── rippled.install │ │ │ │ ├── rippled.preinst │ │ │ │ ├── rippled.prerm │ │ │ │ ├── rippled.postrm │ │ │ │ ├── control │ │ │ │ └── rippled.postinst │ │ └── rpm │ │ │ └── 50-rippled.preset │ ├── gitlab-ci │ │ ├── get_component.sh │ │ ├── docker_alpine_setup.sh │ │ ├── verify_head_commit.sh │ │ ├── build_package.sh │ │ └── build_container.sh │ └── shared │ │ ├── rippled-logrotate │ │ ├── rippled.service │ │ ├── update-rippled-cron │ │ └── update_sources.sh ├── WinVS │ └── images │ │ ├── NoDebugHeapPropPage.png │ │ └── VSCommandArgsPropPage.png └── CMake │ ├── soci_update.cmake │ ├── deps │ ├── Findsoci.cmake │ ├── Findlz4.cmake │ ├── Findsnappy.cmake │ ├── Findsqlite.cmake │ ├── Findsecp256k1.cmake │ └── Findlibarchive_pc.cmake │ ├── rocks_thirdparty.inc │ ├── ChainsqldVersion.cmake │ ├── echo_file.cmake │ ├── README.md │ └── RippledValidatorKeys.cmake ├── .codecov.yml ├── docs ├── images │ ├── logo.png │ ├── ChainSQL.png │ ├── peersafe.jpg │ ├── environment.png │ └── SmartContract.png ├── NodeStoreRefactoringCaseStudy.pdf ├── Docker.md ├── README_CN.md └── CheatSheet.md ├── .git-blame-ignore-revs ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ └── feature_request.md └── workflows │ └── doxygen.yml ├── .gitlab-ci.yml └── bin └── ci ├── build.sh └── ubuntu └── travis-cache-start.sh /src/secp256k1/obj/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/ripple/json/impl/version: -------------------------------------------------------------------------------- 1 | 0.5.0 -------------------------------------------------------------------------------- /src/eth/evmc/CNAME: -------------------------------------------------------------------------------- 1 | evmc.ethereum.org 2 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /src/eth/evmc/.codespell-whitelist: -------------------------------------------------------------------------------- 1 | iff 2 | mut 3 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/simple/0.txt: -------------------------------------------------------------------------------- 1 | Hello world -------------------------------------------------------------------------------- /src/intx/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /cmake-build-* 3 | /.idea -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/wasmboy/.gitignore: -------------------------------------------------------------------------------- 1 | *.gb 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/arduino/.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp8266/.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/hifive1/.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/mal/.gitattributes: -------------------------------------------------------------------------------- 1 | *.mal binary 2 | -------------------------------------------------------------------------------- /src/ed25519-donna/fuzz/ed25519-donna.c: -------------------------------------------------------------------------------- 1 | #include "../ed25519.c" 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/bluepill/.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-pio/.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/src/wasm3: -------------------------------------------------------------------------------- 1 | ../../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/particle/.gitignore: -------------------------------------------------------------------------------- 1 | *.bin 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/wm_w600/.gitignore: -------------------------------------------------------------------------------- 1 | .output 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/wm_w600/wasm3: -------------------------------------------------------------------------------- 1 | ../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/simple/wasm_api.syms: -------------------------------------------------------------------------------- 1 | wasm3_raw_sum 2 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /Builds/containers/packaging/rpm/50-rippled.preset: -------------------------------------------------------------------------------- 1 | enable rippled.service -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/cpp/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | cmake-build-debug 3 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/arduino/lib/wasm3: -------------------------------------------------------------------------------- 1 | ../../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp8266/lib/wasm3: -------------------------------------------------------------------------------- 1 | ../../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/hifive1/lib/wasm3: -------------------------------------------------------------------------------- 1 | ../../../../source -------------------------------------------------------------------------------- /.codecov.yml: -------------------------------------------------------------------------------- 1 | 2 | codecov: 3 | ci: 4 | - !appveyor 5 | - travis 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/cpp/m3: -------------------------------------------------------------------------------- 1 | ../../../../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/particle/project.properties: -------------------------------------------------------------------------------- 1 | name=wasm3 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/ios/.gitignore: -------------------------------------------------------------------------------- 1 | ## User settings 2 | xcuserdata/ 3 | -------------------------------------------------------------------------------- /src/intx/pax_global_header: -------------------------------------------------------------------------------- 1 | 52 comment=d041bb6298a1c79f18baf749bf5f4ec8421112af 2 | -------------------------------------------------------------------------------- /src/secp256k1/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | autoreconf -if --warnings=all 4 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/cpp/m3 2: -------------------------------------------------------------------------------- 1 | ../../../../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/bluepill/lib/wasm3/src: -------------------------------------------------------------------------------- 1 | ../../../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/bluepill/lib/wasm3/src 2: -------------------------------------------------------------------------------- 1 | ../../../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf-wasi/main/wasm3: -------------------------------------------------------------------------------- 1 | ../../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-pio/lib/wasm3/src: -------------------------------------------------------------------------------- 1 | ../../../../../source -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/particle/lib/wasm3/src: -------------------------------------------------------------------------------- 1 | ../../../../../source -------------------------------------------------------------------------------- /src/ripple/json/README.md: -------------------------------------------------------------------------------- 1 | # JSON 2 | 3 | Third party library to do JSON operations. 4 | -------------------------------------------------------------------------------- /src/wasmvm/README.md: -------------------------------------------------------------------------------- 1 | # chainsqlWasmVM 2 | 3 | An interpreter for Wasm in chainsqld 4 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | LICENSE 3 | RELEASENOTES.md 4 | -------------------------------------------------------------------------------- /src/eth/evmc/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /cmake-build-* 3 | /.idea 4 | Cargo.lock 5 | /target 6 | -------------------------------------------------------------------------------- /docs/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/docs/images/logo.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | sdkconfig 3 | sdkconfig.old 4 | -------------------------------------------------------------------------------- /docs/images/ChainSQL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/docs/images/ChainSQL.png -------------------------------------------------------------------------------- /docs/images/peersafe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/docs/images/peersafe.jpg -------------------------------------------------------------------------------- /src/ripple/json/impl/LICENSE: -------------------------------------------------------------------------------- 1 | The json - cpp library and this documentation are in Public Domain. 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf-wasi/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | sdkconfig 3 | sdkconfig.old 4 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/ld/output_format.ld: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-littleriscv") 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib32.wasm: -------------------------------------------------------------------------------- 1 | asm`fib 2 |  AI@  Ak Akj -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib64.wasm: -------------------------------------------------------------------------------- 1 | asm`~~fib 2 |  BT@  B} B}| -------------------------------------------------------------------------------- /docs/images/environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/docs/images/environment.png -------------------------------------------------------------------------------- /src/test/csf/csf_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/test/csf/csf_graph.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/cosmopolitan/.gitignore: -------------------------------------------------------------------------------- 1 | cosmopolitan/ 2 | wasm3.com 3 | wasm3.com.dbg 4 | 5 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/source/local-options: -------------------------------------------------------------------------------- 1 | #abort-on-upstream-changes 2 | #unapply-patches 3 | -------------------------------------------------------------------------------- /docs/images/SmartContract.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/docs/images/SmartContract.png -------------------------------------------------------------------------------- /src/test/csf/csf_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/test/csf/csf_overview.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/app/README.md: -------------------------------------------------------------------------------- 1 | This is the main file for Linux, Windows, Mac OS, OpenWRT builds 2 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/fuzz/corpus/fib32.wasm: -------------------------------------------------------------------------------- 1 | asm`fib 2 |  AI@  Ak Akj -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/fuzz/corpus/fib64.wasm: -------------------------------------------------------------------------------- 1 | asm`~~fib 2 |  BT@  B} B}| -------------------------------------------------------------------------------- /src/ripple/net/images/states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/ripple/net/images/states.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/extra/blynk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/extra/blynk.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/extra/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/extra/logo.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/.gitignore: -------------------------------------------------------------------------------- 1 | .obj 2 | wasm3.bin 3 | wasm3.dfu 4 | wasm3.elf 5 | wasm3.ihex 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/coremark/README.md: -------------------------------------------------------------------------------- 1 | # CoreMark 1.0 2 | 3 | See https://github.com/wasm3/wasm3-coremark 4 | -------------------------------------------------------------------------------- /src/wasmvm/contract/math/math.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/contract/math/math.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/extra/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/extra/button.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/extra/wowcube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/extra/wowcube.png -------------------------------------------------------------------------------- /src/test/app/Transaction2Sql_test.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/test/app/Transaction2Sql_test.cpp -------------------------------------------------------------------------------- /src/wasmvm/wasm3/extra/scailable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/extra/scailable.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib.c.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/lang/fib.c.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib32_tail.wasm: -------------------------------------------------------------------------------- 1 | asm ``fib 2 | & E  Ak   j 3 | AA -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/dirs: -------------------------------------------------------------------------------- 1 | /var/log/rippled/ 2 | /var/lib/rippled/ 3 | /etc/systemd/system/rippled.service.d/ 4 | -------------------------------------------------------------------------------- /docs/NodeStoreRefactoringCaseStudy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/docs/NodeStoreRefactoringCaseStudy.pdf -------------------------------------------------------------------------------- /src/ed25519-donna/fuzz/ed25519-donna-sse2.c: -------------------------------------------------------------------------------- 1 | #define ED25519_SUFFIX _sse2 2 | #define ED25519_SSE2 3 | #include "../ed25519.c" 4 | -------------------------------------------------------------------------------- /src/ripple/ledger/impl/Tuning.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define MAX_GAP_NOW2VALID 5 4 | 5 | #define MAX_GAP_LEDGERNUM_TXN_APPEARIN 5 -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib.min.js: -------------------------------------------------------------------------------- 1 | function fib(f){if(f<2)return f 2 | return fib(f-1)+fib(f-2)} 3 | console.log(fib(32)); 4 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/mal/mal.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/mal/mal.wasm -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/rippled-dev.install: -------------------------------------------------------------------------------- 1 | opt/ripple/include 2 | opt/ripple/lib/*.a 3 | opt/ripple/lib/cmake/ripple 4 | -------------------------------------------------------------------------------- /src/peersafe/gmencrypt/randomcheck/ini.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/peersafe/gmencrypt/randomcheck/ini.h -------------------------------------------------------------------------------- /src/peersafe/gmencrypt/randomcheck/log.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/peersafe/gmencrypt/randomcheck/log.h -------------------------------------------------------------------------------- /src/peersafe/gmencrypt/randomcheck/swsds.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/peersafe/gmencrypt/randomcheck/swsds.h -------------------------------------------------------------------------------- /src/wasmvm/wasm3/extra/screenshot-ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/extra/screenshot-ios.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/fuzz/corpus/fib32_tail.wasm: -------------------------------------------------------------------------------- 1 | asm ``fib 2 | & E  Ak   j 3 | AA -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/fuzz/corpus/fib64_tail.wasm: -------------------------------------------------------------------------------- 1 | asm `~~~~`~~fib 2 | & P~  B}   | 3 | BB -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/c-ray/scene.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/c-ray/scene.jpg -------------------------------------------------------------------------------- /Builds/WinVS/images/NoDebugHeapPropPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/Builds/WinVS/images/NoDebugHeapPropPage.png -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/conffiles: -------------------------------------------------------------------------------- 1 | opt/ripple/etc/rippled.cfg 2 | opt/ripple/etc/validators.txt 3 | etc/logrotate.d/rippled 4 | -------------------------------------------------------------------------------- /src/ripple/net/images/interrupt_sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/ripple/net/images/interrupt_sequence.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/fuzz/corpus/fib.c.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/fuzz/corpus/fib.c.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/c-ray/c-ray.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/c-ray/c-ray.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/simple/test.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/simple/test.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/smallpt/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/smallpt/image.jpg -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/wasmboy/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/wasmboy/image.png -------------------------------------------------------------------------------- /Builds/CMake/soci_update.cmake: -------------------------------------------------------------------------------- 1 | execute_process( 2 | COMMAND git checkout -- * 3 | ) 4 | 5 | execute_process( 6 | COMMAND git pull 7 | ) 8 | -------------------------------------------------------------------------------- /Builds/WinVS/images/VSCommandArgsPropPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/Builds/WinVS/images/VSCommandArgsPropPage.png -------------------------------------------------------------------------------- /src/eth/evmc/NodeStoreRefactoringCaseStudy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/eth/evmc/NodeStoreRefactoringCaseStudy.pdf -------------------------------------------------------------------------------- /src/peersafe/app/tx/impl/AccountAuthorize.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/peersafe/app/tx/impl/AccountAuthorize.cpp -------------------------------------------------------------------------------- /src/peersafe/consensus/hotstuff/impl/NetWork.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/peersafe/consensus/hotstuff/impl/NetWork.h -------------------------------------------------------------------------------- /src/peersafe/rpc/handlers/AccountAuthorized.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/peersafe/rpc/handlers/AccountAuthorized.cpp -------------------------------------------------------------------------------- /src/wasmvm/wasm3/extra/screenshot-android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/extra/screenshot-android.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/ios/wasm3/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/platforms/ios/wasm3/icon.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/brotli/brotli.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/brotli/brotli.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/c-ray/sphfract.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/c-ray/sphfract.jpg -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/mandelbrot/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/mandelbrot/image.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/simple/test-opt.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/simple/test-opt.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/smallpt/smallpt.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/smallpt/smallpt.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/stream/stream.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/stream/stream.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/wasmsynth/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/wasmsynth/image.png -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/README.Debian: -------------------------------------------------------------------------------- 1 | rippled daemon 2 | 3 | -- Mike Ellery Tue, 04 Dec 2018 18:19:03 +0000 4 | -------------------------------------------------------------------------------- /src/intx/cmake/Config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include("${CMAKE_CURRENT_LIST_DIR}/intxTargets.cmake") 4 | check_required_components(intx) 5 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Wasm3 3 | 4 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/self-hosting/wasm3-fib.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/self-hosting/wasm3-fib.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/coremark/coremark.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/coremark/coremark.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/mandelbrot/mandel.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/mandelbrot/mandel.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/wasmboy/wasmerboy.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/wasmboy/wasmerboy.wasm -------------------------------------------------------------------------------- /src/eth/evmc/images/xrp-text-mark-black-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/eth/evmc/images/xrp-text-mark-black-small@2x.png -------------------------------------------------------------------------------- /src/peersafe/consensus/hotstuff/impl/BlockStorage.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/peersafe/consensus/hotstuff/impl/BlockStorage.h -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/cpp/wasm/test_prog.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/platforms/cpp/wasm/test_prog.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/mandelbrot/mandel_dd.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/mandelbrot/mandel_dd.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/smallpt/smallpt-ex.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/smallpt/smallpt-ex.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/wasmsynth/wasm-song.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/wasmsynth/wasm-song.wasm -------------------------------------------------------------------------------- /src/peersafe/consensus/hotstuff/impl/BlockStorage.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/peersafe/consensus/hotstuff/impl/BlockStorage.cpp -------------------------------------------------------------------------------- /src/ripple/crypto/README.md: -------------------------------------------------------------------------------- 1 | # SSLUtil 2 | 3 | This module exposes the OpenSSL headers and provides utilities to 4 | operate with OpenSSL / BIGNUM objects. 5 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/raymarcher/raymarcher.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/raymarcher/raymarcher.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/smallpt/smallpt-ex-mv.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/smallpt/smallpt-ex-mv.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/wasmsynth/hondarribia.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/wasmsynth/hondarribia.wasm -------------------------------------------------------------------------------- /src/beast/extras/README.md: -------------------------------------------------------------------------------- 1 | # Extras 2 | 3 | These are not part of the official public Beast interface but they are used by the tests and some third party programs. 4 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/brotli/alice29.txt.compressed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/brotli/alice29.txt.compressed -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/coremark/coremark-minimal.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/coremark/coremark-minimal.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/wasmsynth/shuffle-chill.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/wasmsynth/shuffle-chill.wasm -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/wasmsynth/webchip-music.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/test/wasi/wasmsynth/webchip-music.wasm -------------------------------------------------------------------------------- /src/intx/codecov.yml: -------------------------------------------------------------------------------- 1 | comment: 2 | layout: "diff" 3 | ignore: 4 | - "test/benchmarks/*" 5 | - "test/fuzzer/*" 6 | - "test/integration/*" 7 | - "test/utils/*" 8 | -------------------------------------------------------------------------------- /src/ripple/proto/README.md: -------------------------------------------------------------------------------- 1 | # Proto 2 | 3 | This holds protocol buffers source code. The protoc tool stores the output 4 | of the .proto files in the build directory. 5 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib.walt: -------------------------------------------------------------------------------- 1 | export function fib(n: i32): i32 { 2 | if (n < 2) { 3 | return n; 4 | } 5 | return fib(n-1) + fib(n-2); 6 | } 7 | -------------------------------------------------------------------------------- /src/peersafe/unity/app_sql.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | #include -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib.py: -------------------------------------------------------------------------------- 1 | import sys 2 | def fib(n): 3 | if n < 2: 4 | return n 5 | return fib(n-1) + fib(n-2) 6 | 7 | print(fib(int(sys.argv[1]))) 8 | -------------------------------------------------------------------------------- /src/wasmvm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | add_subdirectory(wasm3) 4 | add_subdirectory(wasm3/platforms/cpp/wasm3_cpp) 5 | add_subdirectory(example) 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/python/README.md: -------------------------------------------------------------------------------- 1 | # pywasm3 2 | 3 | Python binding for Wasm3, the fastest WebAssembly interpreter. 4 | 5 | ## Moved to https://github.com/wasm3/pywasm3 6 | -------------------------------------------------------------------------------- /src/eth/evmc/0001-negative-unl/negativeUNL_highLevel_sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/eth/evmc/0001-negative-unl/negativeUNL_highLevel_sequence.png -------------------------------------------------------------------------------- /src/eth/evmc/codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | require_ci_to_pass: yes 3 | 4 | coverage: 5 | status: 6 | project: no 7 | patch: no 8 | 9 | comment: 10 | layout: "diff" 11 | -------------------------------------------------------------------------------- /src/secp256k1/TODO: -------------------------------------------------------------------------------- 1 | * Unit tests for fieldelem/groupelem, including ones intended to 2 | trigger fieldelem's boundary cases. 3 | * Complete constant-time operations for signing/keygen 4 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | # Build output directies 3 | */.externalNativeBuild 4 | /target 5 | */target 6 | /build 7 | */build 8 | */.cxx 9 | 10 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/ld/regions.ld: -------------------------------------------------------------------------------- 1 | MEMORY { 2 | sram : ORIGIN = 0x10000000, LENGTH = 0x00020000 3 | rom : ORIGIN = 0x20040000, LENGTH = 0x100000 /* 1 MBit */ 4 | } 5 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib.js: -------------------------------------------------------------------------------- 1 | function fib(n) { 2 | if(n < 2) { 3 | return n; 4 | } 5 | return fib(n-1) + fib(n-2) 6 | } 7 | 8 | console.log(fib(process.argv[2])) 9 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/default.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/default.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/openwrt/README.md: -------------------------------------------------------------------------------- 1 | # wasm3 for OpenWrt 2 | 3 | You can find `wasm3` package and build instructions here: 4 | 5 | https://github.com/wasm3/wasm3-openwrt-packages 6 | 7 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib.lua: -------------------------------------------------------------------------------- 1 | local function fib(n) 2 | if n < 2 then 3 | return n 4 | end 5 | return fib(n-1) + fib(n-2) 6 | end 7 | 8 | print(fib(tonumber(arg[1]))) 9 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/Config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include(${CMAKE_CURRENT_LIST_DIR}/evmcTargets.cmake) 4 | check_required_components(evmc) 5 | 6 | include(${CMAKE_CURRENT_LIST_DIR}/EVMC.cmake) 7 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/drawable/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/platforms/android/app/src/main/res/drawable/ic_launcher.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/source/m3_exec.c: -------------------------------------------------------------------------------- 1 | // 2 | // m3_exec.c 3 | // 4 | // Created by Steven Massey on 4/17/19. 5 | // Copyright © 2019 Steven Massey. All rights reserved. 6 | // 7 | 8 | // EMPTY FOR NOW 9 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # This feature requires Git >= 2.24 2 | # To use it by default in git blame: 3 | # git config blame.ignoreRevsFile .git-blame-ignore-revs 4 | 50760c693510894ca368e90369b0cc2dabfd07f3 5 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf/main/linker.lf: -------------------------------------------------------------------------------- 1 | [mapping:wasm3] 2 | archive: libm3.a 3 | entries: 4 | m3_core (noflash_text) 5 | m3_exec (noflash_text) 6 | m3_compile (noflash_text) 7 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-pio/lib/wasm3/README.md: -------------------------------------------------------------------------------- 1 | This is a placeholder for the wasm3 PIO library. 2 | 3 | At the moment it simply adds the source code as a symlink, and sets some build flags. 4 | -------------------------------------------------------------------------------- /src/eth/evmc/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # EVMC Authors 2 | 3 | > The sorted list of EVMC authors for copyright purposes. 4 | 5 | - Alex Beregszaszi 6 | - Pawel Bylica [@chfast](https://github.com/chfast) 7 | -------------------------------------------------------------------------------- /src/intx/test/integration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # intx: extended precision integer library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | add_subdirectory(cmake_package) 6 | -------------------------------------------------------------------------------- /src/wasmvm/contract/math/math.cc: -------------------------------------------------------------------------------- 1 | #include "math.h" 2 | 3 | int math::add(int a, int b) 4 | { 5 | int ret = a + b; 6 | sum_ += ret; 7 | return sum_; 8 | } 9 | 10 | CHAINSQL_DISPATCH(math, (add)) -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainSQL/chainsqld/HEAD/src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/peersafe/unity/app_schema.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/rippled.links: -------------------------------------------------------------------------------- 1 | opt/ripple/etc/rippled.cfg etc/opt/ripple/rippled.cfg 2 | opt/ripple/etc/validators.txt etc/opt/ripple/validators.txt 3 | opt/ripple/bin/rippled usr/local/bin/rippled 4 | -------------------------------------------------------------------------------- /src/ripple/json/TODO.md: -------------------------------------------------------------------------------- 1 | # JSON TODO 2 | 3 | - Investigate other third party libraries, especially those that are 4 | proven hardened against attacks, or perform better 5 | 6 | - Implement canonical JSON API to do signing 7 | 8 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf/.old/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | 6 | -------------------------------------------------------------------------------- /src/eth/evmc/tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | add_subdirectory(evmc) 6 | add_subdirectory(vmtester) 7 | -------------------------------------------------------------------------------- /src/eth/tools/ripemd160.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | using namespace ripple; 7 | 8 | namespace eth { 9 | Blob eth_ripemd160(Slice const& _input); 10 | } -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf-wasi/.old/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/.gitignore: -------------------------------------------------------------------------------- 1 | /build* 2 | /source-* 3 | /.toolchains 4 | test/.spec-* 5 | test/*.log 6 | test/tailcall/*.S 7 | node_modules/ 8 | __pycache__/ 9 | .project 10 | .cproject 11 | .settings 12 | .vscode 13 | .DS_Store 14 | -------------------------------------------------------------------------------- /src/eth/evmc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "bindings/rust/evmc-sys", 4 | "bindings/rust/evmc-vm", 5 | "bindings/rust/evmc-declare", 6 | "bindings/rust/evmc-declare-tests", 7 | "examples/example-rust-vm" 8 | ] 9 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/cpp/wasm3_cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | add_library(wasm3_cpp INTERFACE) 3 | target_include_directories(wasm3_cpp INTERFACE include) 4 | target_compile_features(wasm3_cpp INTERFACE cxx_std_17) 5 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-pio/lib/wasm3/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "build" : { 3 | "flags": "-DESP32 -O3 -Wfatal-errors -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/particle/lib/wasm3/library.properties: -------------------------------------------------------------------------------- 1 | name=wasm3 2 | version=0.1.0 3 | license=MIT 4 | author=Volodymyr Shymanskyy 5 | sentence=WebAssembly interpreter for Particle devices 6 | url=https://github.com/vshymanskyy/wasm3 7 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/buildinfo/buildinfo.sh.in: -------------------------------------------------------------------------------- 1 | PROJECT_NAME='@PROJECT_NAME@' 2 | PROJECT_VERSION='@PROJECT_VERSION@' 3 | PROJECT_VERSION_IS_PRERELEASE='@PROJECT_VERSION_IS_PRERELEASE@' 4 | SYSTEM_NAME='@SYSTEM_NAME@' 5 | SYSTEM_PROCESSOR='@SYSTEM_PROCESSOR@' 6 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/buildinfo/buildinfo.sh.in: -------------------------------------------------------------------------------- 1 | PROJECT_NAME='@PROJECT_NAME@' 2 | PROJECT_VERSION='@PROJECT_VERSION@' 3 | PROJECT_VERSION_IS_PRERELEASE='@PROJECT_VERSION_IS_PRERELEASE@' 4 | SYSTEM_NAME='@SYSTEM_NAME@' 5 | SYSTEM_PROCESSOR='@SYSTEM_PROCESSOR@' 6 | -------------------------------------------------------------------------------- /src/wasmvm/common/check.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace chainsql { 6 | inline void check(bool test, const void* msg, uint32_t msg_len) { 7 | } 8 | 9 | inline void check(bool test, const void* msg) { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # Increased stack size 2 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=32768 3 | 4 | # Disable task watchdog 5 | CONFIG_ESP_TASK_WDT=n 6 | 7 | # Increase CPU frequency 8 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 9 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/gdb_init: -------------------------------------------------------------------------------- 1 | set history save on 2 | set confirm off 3 | set remotetimeout 240 4 | set print asm-demangle on 5 | 6 | target remote localhost:1234 7 | 8 | # monitor reset halt 9 | # load 10 | # continue 11 | # quit 12 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx14.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 14) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx17.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf/.old/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := wasm3 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx14.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 14) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx17.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/buildinfo/buildinfo.ps1.in: -------------------------------------------------------------------------------- 1 | $env:project_name="@PROJECT_NAME@" 2 | $env:project_version="@PROJECT_VERSION@" 3 | $env:project_version_is_prerelease="@PROJECT_VERSION_IS_PRERELEASE@" 4 | $env:system_name='@SYSTEM_NAME@' 5 | $env:system_processor='@SYSTEM_PROCESSOR@' 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf-wasi/.old/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := wasm3 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | -------------------------------------------------------------------------------- /src/ed25519-donna/ed25519-randombytes-custom.h: -------------------------------------------------------------------------------- 1 | /* 2 | a custom randombytes must implement: 3 | 4 | void ED25519_FN(ed25519_randombytes_unsafe) (void *p, size_t len); 5 | 6 | ed25519_randombytes_unsafe is used by the batch verification function 7 | to create random scalars 8 | */ 9 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/buildinfo/buildinfo.ps1.in: -------------------------------------------------------------------------------- 1 | $env:project_name="@PROJECT_NAME@" 2 | $env:project_version="@PROJECT_VERSION@" 3 | $env:project_version_is_prerelease="@PROJECT_VERSION_IS_PRERELEASE@" 4 | $env:system_name='@SYSTEM_NAME@' 5 | $env:system_processor='@SYSTEM_PROCESSOR@' 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/bluepill/platformio.ini: -------------------------------------------------------------------------------- 1 | [env:bluepill] 2 | platform = ststm32 3 | board = bluepill_f103c8 4 | framework = stm32cube 5 | upload_protocol = stlink 6 | lib_deps = jeeh 7 | 8 | build_flags = 9 | -Dd_m3FixedHeap=8192 10 | -Os -Wfatal-errors 11 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #654ff0 4 | #4b3bb3 5 | #bfd9cc 6 | 7 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/include/csr-defs.h: -------------------------------------------------------------------------------- 1 | #ifndef CSR_DEFS__H 2 | #define CSR_DEFS__H 3 | 4 | #define CSR_MSTATUS_MIE 0x8 5 | 6 | #define CSR_IRQ_MASK 0xBC0 7 | #define CSR_IRQ_PENDING 0xFC0 8 | 9 | #define CSR_DCACHE_INFO 0xCC0 10 | 11 | #endif /* CSR_DEFS__H */ 12 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx11.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx11.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | project(wasm3) 7 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/mal/test-fib.mal: -------------------------------------------------------------------------------- 1 | ;; Compute a Fibonacci number with two recursions. 2 | (def! fib 3 | (fn* [n] ; non-negative number 4 | (if (<= n 1) 5 | n 6 | (+ (fib (- n 1)) (fib (- n 2)))))) 7 | 8 | (println (fib (read-string (first *ARGV*)))) 9 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf-wasi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | project(wasm3) 7 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/rippled.install: -------------------------------------------------------------------------------- 1 | opt/ripple/bin/rippled 2 | opt/ripple/bin/validator-keys 3 | opt/ripple/bin/update-rippled.sh 4 | opt/ripple/bin/getRippledInfo 5 | opt/ripple/etc/rippled.cfg 6 | opt/ripple/etc/validators.txt 7 | opt/ripple/etc/update-rippled-cron 8 | etc/logrotate.d/rippled 9 | -------------------------------------------------------------------------------- /src/eth/unity/vm_unity.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include -------------------------------------------------------------------------------- /src/wasmvm/contract/math/math.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "chainsqlib/contracts/contract.h" 7 | 8 | class math : public chainsql::contract { 9 | public: 10 | using contract::contract; 11 | int add(int a, int b); 12 | private: 13 | int sum_; 14 | }; -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/ios/wasm3/Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | typedef void (*print_cbk_t)(const char* buff, int len); 6 | 7 | void redirect_output (print_cbk_t f); 8 | int run_app (void); 9 | -------------------------------------------------------------------------------- /src/ed25519-donna/fuzz/curve25519-ref10.h: -------------------------------------------------------------------------------- 1 | #ifndef CURVE25519_REF10_H 2 | #define CURVE25519_REF10_H 3 | 4 | int crypto_scalarmult_base_ref10(unsigned char *q,const unsigned char *n); 5 | int crypto_scalarmult_ref10(unsigned char *q, const unsigned char *n, const unsigned char *p); 6 | 7 | #endif /* CURVE25519_REF10_H */ 8 | 9 | -------------------------------------------------------------------------------- /src/ripple/README.md: -------------------------------------------------------------------------------- 1 | # Ripple Source Guidelines 2 | 3 | Each folder contains a single module following the newest style: 4 | 5 | - One class per header 6 | - As much implementation hidden as possible 7 | - All major interfaces are abstract 8 | - Every class is documented 9 | - Each module focuses on solving one problem 10 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx14-pic.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 14) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 10 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx17-pic.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 10 | -------------------------------------------------------------------------------- /src/intx/examples/use_cmake_package/use_int128.cpp: -------------------------------------------------------------------------------- 1 | // intx: extended precision integer library. 2 | // Copyright 2019 Pawel Bylica. 3 | // Licensed under the Apache License, Version 2.0. 4 | 5 | #include 6 | 7 | int main(int argc, char**) 8 | { 9 | return static_cast(argc / intx::uint128{1, 0}); 10 | } 11 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/include/time.h: -------------------------------------------------------------------------------- 1 | #ifndef __TIME_H 2 | #define __TIME_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void time_init(void); 9 | int elapsed(int *last_event, int period); 10 | void msleep(int ms); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif /* __TIME_H */ 17 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx14-pic.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 14) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 10 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx17-pic.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 10 | -------------------------------------------------------------------------------- /src/eth/evmc/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2018-2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | add_subdirectory(cmake_package) 6 | add_subdirectory(compilation) 7 | add_subdirectory(tools) 8 | add_subdirectory(unittests) 9 | add_subdirectory(vmtester) 10 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/rippled.preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | case "$1" in 5 | install|upgrade) 6 | ;; 7 | 8 | abort-upgrade) 9 | ;; 10 | 11 | *) 12 | echo "preinst called with unknown argument \`$1'" >&2 13 | exit 1 14 | ;; 15 | esac 16 | 17 | 18 | #DEBHELPER# 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /src/intx/examples/use_cmake_package/use_intx.cpp: -------------------------------------------------------------------------------- 1 | // intx: extended precision integer library. 2 | // Copyright 2019 Pawel Bylica. 3 | // Licensed under the Apache License, Version 2.0. 4 | 5 | #include 6 | 7 | int main(int argc, char**) 8 | { 9 | return static_cast(intx::uint512{argc} / (intx::uint512{1} << 111)); 10 | } 11 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx11-pic.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 10 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/.env: -------------------------------------------------------------------------------- 1 | fomu-reset () { 2 | wishbone-tool 0xe0006000 0xac 3 | } 4 | 5 | fomu-reload () { 6 | fomu-reset 7 | dfu-util -e 8 | } 9 | 10 | fomu-load-dbg () { 11 | dfu-util -e 12 | wishbone-tool -s gdb 13 | } 14 | 15 | fomu-gdb () { 16 | riscv64-unknown-elf-gdb $1 -ex 'target remote localhost:1234' 17 | } 18 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/include/crc.h: -------------------------------------------------------------------------------- 1 | #ifndef __CRC_H 2 | #define __CRC_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | unsigned short crc16(const unsigned char *buffer, int len); 9 | unsigned int crc32(const unsigned char *buffer, unsigned int len); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/rippled.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | case "$1" in 5 | remove|upgrade|deconfigure) 6 | ;; 7 | 8 | failed-upgrade) 9 | ;; 10 | 11 | *) 12 | echo "prerm called with unknown argument \`$1'" >&2 13 | exit 1 14 | ;; 15 | esac 16 | 17 | 18 | #DEBHELPER# 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx11-pic.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 10 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx14-32bit.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 14) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_C_FLAGS_INIT -m32) 10 | set(CMAKE_CXX_FLAGS_INIT -m32) 11 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx17-32bit.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_C_FLAGS_INIT -m32) 10 | set(CMAKE_CXX_FLAGS_INIT -m32) 11 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/rippled.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | case "$1" in 5 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 6 | ;; 7 | 8 | *) 9 | echo "postrm called with unknown argument \`$1'" >&2 10 | exit 1 11 | ;; 12 | esac 13 | 14 | 15 | #DEBHELPER# 16 | 17 | exit 0 18 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx14-32bit.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 14) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_C_FLAGS_INIT -m32) 10 | set(CMAKE_CXX_FLAGS_INIT -m32) 11 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx17-32bit.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_C_FLAGS_INIT -m32) 10 | set(CMAKE_CXX_FLAGS_INIT -m32) 11 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx11-32bit.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018-2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_C_FLAGS_INIT -m32) 10 | set(CMAKE_CXX_FLAGS_INIT -m32) 11 | -------------------------------------------------------------------------------- /src/secp256k1/src/modules/ecdh/Makefile.am.include: -------------------------------------------------------------------------------- 1 | include_HEADERS += include/secp256k1_ecdh.h 2 | noinst_HEADERS += src/modules/ecdh/main_impl.h 3 | noinst_HEADERS += src/modules/ecdh/tests_impl.h 4 | if USE_BENCHMARK 5 | noinst_PROGRAMS += bench_ecdh 6 | bench_ecdh_SOURCES = src/bench_ecdh.c 7 | bench_ecdh_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB) 8 | endif 9 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/include/spiflash.h: -------------------------------------------------------------------------------- 1 | #ifndef __SPIFLASH_H 2 | #define __SPIFLASH_H 3 | 4 | void write_to_flash_page(unsigned int addr, const unsigned char *c, unsigned int len); 5 | void erase_flash_sector(unsigned int addr); 6 | void write_to_flash(unsigned int addr, const unsigned char *c, unsigned int len); 7 | 8 | #endif /* __SPIFLASH_H */ 9 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx11-32bit.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018-2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_C_FLAGS_INIT -m32) 10 | set(CMAKE_CXX_FLAGS_INIT -m32) 11 | -------------------------------------------------------------------------------- /src/peersafe/crypto/LibSnark.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace peersafe 6 | { 7 | 8 | std::pair alt_bn128_pairing_product(eth::bytesConstRef _in); 9 | std::pair alt_bn128_G1_add(eth::bytesConstRef _in); 10 | std::pair alt_bn128_G1_mul(eth::bytesConstRef _in); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/buildinfo/buildinfo.json.in: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@PROJECT_NAME@", 3 | "version": "@PROJECT_VERSION@", 4 | "is_prerelease": @PROJECT_VERSION_IS_PRERELEASE@, 5 | "commit": "@GIT_COMMIT_HASH@", 6 | "branch": "@GIT_BRANCH@", 7 | "repo": "@GIT_ORIGIN_URL@", 8 | "system_name": "@SYSTEM_NAME@", 9 | "system_processor": "@SYSTEM_PROCESSOR@" 10 | } 11 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx11-c99.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_C_STANDARD 99) 10 | set(CMAKE_C_EXTENSIONS OFF) 11 | -------------------------------------------------------------------------------- /src/peersafe/consensus/rpca/README.md: -------------------------------------------------------------------------------- 1 | # Consensus 2 | 3 | This directory contains the implementation of a 4 | generic consensus algorithm. The implementation 5 | follows a CRTP design, requiring client code to implement 6 | specific functions and types to use consensus in their 7 | application. The interface is undergoing refactoring and 8 | is not yet finalized. 9 | 10 | -------------------------------------------------------------------------------- /src/ripple/proto/org/zxcl/rpc/v1/account.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package org.zxcl.rpc.v1; 4 | option java_package = "org.zxcl.rpc.v1"; 5 | option java_multiple_files = true; 6 | 7 | // A representation of an account address 8 | // Next field: 2 9 | message AccountAddress 10 | { 11 | // base58 encoding of an account 12 | string address = 1; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/buildinfo/buildinfo.json.in: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@PROJECT_NAME@", 3 | "version": "@PROJECT_VERSION@", 4 | "is_prerelease": @PROJECT_VERSION_IS_PRERELEASE@, 5 | "commit": "@GIT_COMMIT_HASH@", 6 | "branch": "@GIT_BRANCH@", 7 | "repo": "@GIT_ORIGIN_URL@", 8 | "system_name": "@SYSTEM_NAME@", 9 | "system_processor": "@SYSTEM_PROCESSOR@" 10 | } 11 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx11-c99.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_C_STANDARD 99) 10 | set(CMAKE_C_EXTENSIONS OFF) 11 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/bluepill/lib/wasm3/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "build" : { 3 | "flags": "-Os -fomit-frame-pointer -fno-stack-check -fno-stack-protector -Wfatal-errors -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers", 4 | "srcFilter": ["+<*>", "-"], 5 | "libArchive": false 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/secp256k1/src/modules/recovery/Makefile.am.include: -------------------------------------------------------------------------------- 1 | include_HEADERS += include/secp256k1_recovery.h 2 | noinst_HEADERS += src/modules/recovery/main_impl.h 3 | noinst_HEADERS += src/modules/recovery/tests_impl.h 4 | if USE_BENCHMARK 5 | noinst_PROGRAMS += bench_recover 6 | bench_recover_SOURCES = src/bench_recover.c 7 | bench_recover_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB) 8 | endif 9 | -------------------------------------------------------------------------------- /Builds/containers/gitlab-ci/get_component.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | case ${CI_COMMIT_REF_NAME} in 3 | develop) 4 | export COMPONENT="nightly" 5 | ;; 6 | release) 7 | export COMPONENT="unstable" 8 | ;; 9 | master) 10 | export COMPONENT="stable" 11 | ;; 12 | *) 13 | export COMPONENT="_unknown_" 14 | ;; 15 | esac 16 | 17 | -------------------------------------------------------------------------------- /Builds/containers/shared/rippled-logrotate: -------------------------------------------------------------------------------- 1 | /var/log/rippled/*.log { 2 | daily 3 | minsize 200M 4 | rotate 7 5 | nocreate 6 | missingok 7 | notifempty 8 | compress 9 | compresscmd /usr/bin/nice 10 | compressoptions -n19 ionice -c3 gzip 11 | compressext .gz 12 | postrotate 13 | /opt/ripple/bin/rippled --conf /opt/ripple/etc/rippled.cfg logrotate 14 | endscript 15 | } 16 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf-wasi/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # Increased stack size 2 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=65536 3 | 4 | # Disable task watchdog 5 | CONFIG_ESP_TASK_WDT=n 6 | 7 | # Increase CPU frequency 8 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 9 | 10 | # PSRAM support 11 | CONFIG_SPIRAM_SUPPORT=y 12 | CONFIG_SPIRAM_IGNORE_NOTFOUND=y 13 | CONFIG_SPIRAM_USE_MALLOC=y 14 | 15 | -------------------------------------------------------------------------------- /Builds/containers/shared/rippled.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ripple Daemon 3 | After=network-online.target 4 | Wants=network-online.target 5 | 6 | [Service] 7 | Type=simple 8 | ExecStart=/opt/ripple/bin/rippled --net --silent --conf /etc/opt/ripple/rippled.cfg 9 | Restart=on-failure 10 | User=rippled 11 | Group=rippled 12 | LimitNOFILE=65536 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /src/eth/evmc/test/compilation/compilation_test.c: -------------------------------------------------------------------------------- 1 | /* EVMC: Ethereum Client-VM Connector API. 2 | * Copyright 2018-2019 The EVMC Authors. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | 6 | /* Test compilation of C public headers. */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /src/intx/test/experimental/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # intx: extended precision integer library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | add_library(experimental STATIC div.hpp div.cpp) 6 | target_include_directories(experimental PUBLIC ${PROJECT_SOURCE_DIR}/test) 7 | target_link_libraries(experimental PUBLIC intx) 8 | add_library(intx::experimental ALIAS experimental) 9 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/cpp/wasm/Makefile: -------------------------------------------------------------------------------- 1 | NAME=test_prog 2 | SRC=$(NAME).c 3 | WASM=$(NAME).wasm 4 | HEADER=$(NAME).wasm.h 5 | EMCC_FLAGS=-s STANDALONE_WASM -s ERROR_ON_UNDEFINED_SYMBOLS=0 -O3 6 | 7 | all: $(HEADER) 8 | 9 | clean: 10 | rm -f $(HEADER) $(WASM) 11 | 12 | .PHONY: all clean 13 | 14 | $(WASM): $(SRC) 15 | emcc $< -o $@ $(EMCC_FLAGS) 16 | 17 | $(HEADER): $(WASM) 18 | xxd -i $< >$@ 19 | -------------------------------------------------------------------------------- /src/secp256k1/libsecp256k1.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libsecp256k1 7 | Description: Optimized C library for EC operations on curve secp256k1 8 | URL: https://github.com/bitcoin-core/secp256k1 9 | Version: @PACKAGE_VERSION@ 10 | Cflags: -I${includedir} 11 | Libs.private: @SECP_LIBS@ 12 | Libs: -L${libdir} -lsecp256k1 13 | 14 | -------------------------------------------------------------------------------- /Builds/CMake/deps/Findsoci.cmake: -------------------------------------------------------------------------------- 1 | find_package (PkgConfig) 2 | if (PKG_CONFIG_FOUND) 3 | # TBD - currently no soci pkgconfig 4 | #pkg_search_module (soci_PC QUIET libsoci_core>=3.2) 5 | endif () 6 | 7 | if(static) 8 | set(SOCI_LIB libsoci.a) 9 | else() 10 | set(SOCI_LIB libsoci_core.so) 11 | endif() 12 | 13 | find_library (soci 14 | NAMES ${SOCI_LIB}) 15 | 16 | find_path (SOCI_INCLUDE_DIR 17 | NAMES soci/soci.h) 18 | -------------------------------------------------------------------------------- /Builds/CMake/rocks_thirdparty.inc: -------------------------------------------------------------------------------- 1 | set (THIRDPARTY_LIBS "") 2 | 3 | if(WITH_SNAPPY) 4 | add_definitions(-DSNAPPY) 5 | include_directories(${Snappy_INCLUDE_DIRS}) 6 | set (THIRDPARTY_LIBS ${THIRDPARTY_LIBS} ${Snappy_LIBRARIES}) 7 | endif() 8 | 9 | if(WITH_LZ4) 10 | add_definitions(-DLZ4) 11 | include_directories(${lz4_INCLUDE_DIRS}) 12 | set (THIRDPARTY_LIBS ${THIRDPARTY_LIBS} ${lz4_LIBRARIES}) 13 | endif() 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/simple/wasm_api.h: -------------------------------------------------------------------------------- 1 | #ifndef wasm_api_h 2 | #define wasm_api_h 3 | 4 | #include 5 | 6 | #define WASM_EXPORT __attribute__((used)) __attribute__((visibility ("default"))) 7 | #define WASM_EXPORT_AS(NAME) WASM_EXPORT __attribute__((export_name(NAME))) 8 | #define WASM_IMPORT(MODULE,NAME) __attribute__((import_module(MODULE))) __attribute__((import_name(NAME))) 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /Builds/containers/shared/update-rippled-cron: -------------------------------------------------------------------------------- 1 | # For automatic updates, symlink this file to /etc/cron.d/ 2 | # Do not remove the newline at the end of this cron script 3 | 4 | # bash required for use of RANDOM below. 5 | SHELL=/bin/bash 6 | PATH=/sbin;/bin;/usr/sbin;/usr/bin 7 | 8 | # invoke check/update script with random delay up to 59 mins 9 | 0 * * * * root sleep $((RANDOM*3540/32768)) && /opt/ripple/bin/update-rippled.sh 10 | 11 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /src/eth/evmc/docs/custom.dox: -------------------------------------------------------------------------------- 1 | /** 2 | * @defgroup cpp EVMC C++ 3 | * @copydoc evmc 4 | */ 5 | 6 | /** 7 | * @file evmc.h 8 | * @copydoc EVMC 9 | */ 10 | 11 | /** 12 | * @file evmc.hpp 13 | * @copydoc cpp 14 | */ 15 | 16 | /** 17 | * @file helpers.h 18 | * @copydoc helpers 19 | */ 20 | 21 | /** 22 | * @file instructions.h 23 | * @copydoc instructions 24 | */ 25 | 26 | /** 27 | * @file loader.h 28 | * @copydoc loader 29 | */ 30 | -------------------------------------------------------------------------------- /src/ed25519-donna/ed25519-hash-custom.h: -------------------------------------------------------------------------------- 1 | /* 2 | a custom hash must have a 512bit digest and implement: 3 | 4 | struct ed25519_hash_context; 5 | 6 | void ed25519_hash_init(ed25519_hash_context *ctx); 7 | void ed25519_hash_update(ed25519_hash_context *ctx, const uint8_t *in, size_t inlen); 8 | void ed25519_hash_final(ed25519_hash_context *ctx, uint8_t *hash); 9 | void ed25519_hash(uint8_t *hash, const uint8_t *in, size_t inlen); 10 | */ 11 | 12 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/include/generated/mem.h: -------------------------------------------------------------------------------- 1 | #ifndef __GENERATED_MEM_H 2 | #define __GENERATED_MEM_H 3 | 4 | #define VEXRISCV_DEBUG_BASE 0xf00f0000 5 | #define VEXRISCV_DEBUG_SIZE 0x00000010 6 | 7 | #define SRAM_BASE 0x10000000 8 | #define SRAM_SIZE 0x00020000 9 | 10 | #define ROM_BASE 0x00000000 11 | #define ROM_SIZE 0x00002000 12 | 13 | #define SPIFLASH_BASE 0x20000000 14 | #define SPIFLASH_SIZE 0x00200000 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/source/m3_api_tracer.h: -------------------------------------------------------------------------------- 1 | // 2 | // m3_api_tracer.h 3 | // 4 | // Created by Volodymyr Shymanskyy on 02/18/20. 5 | // Copyright © 2020 Volodymyr Shymanskyy. All rights reserved. 6 | // 7 | 8 | #ifndef m3_api_tracer_h 9 | #define m3_api_tracer_h 10 | 11 | #include "m3_core.h" 12 | 13 | d_m3BeginExternC 14 | 15 | M3Result m3_LinkTracer (IM3Module io_module); 16 | 17 | d_m3EndExternC 18 | 19 | #endif // m3_api_tracer_h 20 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/particle/README.md: -------------------------------------------------------------------------------- 1 | ## Build for Particle 2 | 3 | You need to install Particle CLI. 4 | 5 | Build for `photon`, `electron`, `pi`, `duo`, `p1`, `argon`, `boron`, `xenon`: 6 | ```sh 7 | particle compile --followSymlinks photon 8 | ``` 9 | 10 | Upload to device: 11 | ``` 12 | particle list 13 | particle flash MyDevice1 ./firmware_*.bin 14 | 15 | # Or using USB: 16 | particle flash --usb ./firmware_*.bin 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /src/eth/vm/VMFactory.h: -------------------------------------------------------------------------------- 1 | #ifndef __H_CHAINSQL_VM_VMFACTORY_H__ 2 | #define __H_CHAINSQL_VM_VMFACTORY_H__ 3 | 4 | #include "VMFace.h" 5 | 6 | namespace eth { 7 | 8 | enum class VMKind { 9 | Interpreter, 10 | JIT 11 | }; 12 | 13 | class VMFactory { 14 | public: 15 | VMFactory() = delete; 16 | ~VMFactory() = delete; 17 | 18 | static VMFace::pointer create(VMKind kind); 19 | }; 20 | 21 | } // namespace ripple 22 | 23 | #endif // __H_CHAINSQL_VM_VMFACTORY_H__ -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/buildinfo/version.h.in: -------------------------------------------------------------------------------- 1 | /* Cable: CMake Bootstrap Library. 2 | * Copyright 2019 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | 6 | /* Generated by Cable Build Info on @TIMESTAMP@. Do not modify directly. */ 7 | 8 | #pragma once 9 | 10 | #define @PROJECT_NAME_UPPERCASE@_VERSION "@PROJECT_VERSION@" 11 | 12 | #ifdef __cplusplus 13 | constexpr auto @PROJECT_NAME@_version = "@PROJECT_VERSION@"; 14 | #endif 15 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/Hunter/init.cmake: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2018-2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | # Setup Hunter. 6 | # Hunter is going to be initialized only if building with tests, 7 | # where it is needed to get dependencies. 8 | HunterGate( 9 | URL "https://github.com/ruslo/hunter/archive/v0.23.214.tar.gz" 10 | SHA1 "e14bc153a7f16d6a5eeec845fb0283c8fad8c358" 11 | LOCAL 12 | ) 13 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/cxx11-fpic.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 10 | 11 | set(CMAKE_CXX_FLAGS_INIT "-fPIC" CACHE STRING "" FORCE) 12 | set(CMAKE_C_FLAGS_INIT "-fPIC" CACHE STRING "" FORCE) 13 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/cxx11-fpic.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 10 | 11 | set(CMAKE_CXX_FLAGS_INIT "-fPIC" CACHE STRING "" FORCE) 12 | set(CMAKE_C_FLAGS_INIT "-fPIC" CACHE STRING "" FORCE) 13 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/hifive1/README.md: -------------------------------------------------------------------------------- 1 | ## Build for HiFive1 2 | 3 | ### Debugging: 4 | 5 | On first console, run 6 | ```sh 7 | JLinkGDBServer -singlerun -if JTAG -select USB -speed 1000 -jtagconf -1,-1 -device FE310 --port 2331 8 | ``` 9 | 10 | On second console, run `riscv64-unknown-elf-gdb`: 11 | ```gdb 12 | file ".pio/build/hifive1-revb/firmware.elf" 13 | target extended-remote :2331 14 | b main 15 | monitor halt 16 | monitor reset 17 | load 18 | c 19 | ``` 20 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/c-ray/scene: -------------------------------------------------------------------------------- 1 | # spheres 2 | # position radius color shininess reflectivity 3 | s -1.5 -0.3 -1 0.7 1.0 0.2 0.05 50.0 0.3 4 | s 1.5 -0.4 0 0.6 0.1 0.85 1.0 50.0 0.4 5 | 6 | # walls 7 | s 0 -1000 2 999 0.1 0.2 0.6 80.0 0.8 8 | 9 | # bouncing ball 10 | s 0 0 2 1 1.0 0.5 0.1 60.0 0.7 11 | 12 | # lights... 13 | l -50 100 -50 14 | l 40 40 150 15 | 16 | # camera (there can be only one!) 17 | # position FOV target 18 | c 0 6 -17 45 0 -1 0 19 | -------------------------------------------------------------------------------- /src/eth/evmc/examples/use_evmc_in_cmake/use_evmc_in_cmake.c: -------------------------------------------------------------------------------- 1 | /* EVMC: Ethereum Client-VM Connector API. 2 | * Copyright 2018-2019 The EVMC Authors. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | 6 | /** This example shows how to use evmc INTERFACE library from evmc CMake package. */ 7 | 8 | #include 9 | 10 | int main() 11 | { 12 | struct evmc_vm vm = {.abi_version = EVMC_ABI_VERSION}; 13 | return vm.abi_version - EVMC_ABI_VERSION; 14 | } 15 | -------------------------------------------------------------------------------- /src/eth/evmc/examples/use_instructions_in_cmake/use_instructions_in_cmake.c: -------------------------------------------------------------------------------- 1 | /* EVMC: Ethereum Client-VM Connector API. 2 | * Copyright 2018-2019 The EVMC Authors. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | 6 | /** This example shows how to use evmc::instructions library from evmc CMake package. */ 7 | 8 | #include 9 | 10 | int main() 11 | { 12 | return evmc_get_instruction_metrics_table(EVMC_BYZANTIUM)[OP_STOP].gas_cost; 13 | } 14 | -------------------------------------------------------------------------------- /src/intx/test/fuzzer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # intx: extended precision integer library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | find_package(GMP REQUIRED) 6 | 7 | string(REPLACE fuzzer-no-link fuzzer CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) 8 | 9 | add_executable(intx-fuzzer fuzz_intx.cpp) 10 | target_link_libraries(intx-fuzzer PRIVATE intx GMP::gmp) 11 | set_target_properties(intx-fuzzer PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..) 12 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/source/m3_api_libc.h: -------------------------------------------------------------------------------- 1 | // 2 | // m3_api_libc.h 3 | // 4 | // Created by Volodymyr Shymanskyy on 11/20/19. 5 | // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. 6 | // 7 | 8 | #ifndef m3_api_libc_h 9 | #define m3_api_libc_h 10 | 11 | #include "m3_core.h" 12 | 13 | d_m3BeginExternC 14 | 15 | M3Result m3_LinkLibC (IM3Module io_module); 16 | M3Result m3_LinkSpecTest (IM3Module io_module); 17 | 18 | d_m3EndExternC 19 | 20 | #endif // m3_api_libc_h 21 | -------------------------------------------------------------------------------- /src/ed25519-donna/fuzz/ed25519-ref10.h: -------------------------------------------------------------------------------- 1 | #ifndef ED25519_REF10_H 2 | #define ED25519_REF10_H 3 | 4 | int crypto_sign_pk_ref10(unsigned char *pk,unsigned char *sk); 5 | int crypto_sign_ref10(unsigned char *sm,unsigned long long *smlen,const unsigned char *m,unsigned long long mlen,const unsigned char *sk); 6 | int crypto_sign_open_ref10(unsigned char *m,unsigned long long *mlen,const unsigned char *sm,unsigned long long smlen,const unsigned char *pk); 7 | 8 | #endif /* ED25519_REF10_H */ 9 | 10 | -------------------------------------------------------------------------------- /src/peersafe/unity/app_contract.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | // #include 4 | // #include 5 | // #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: XRP Ledger Documentation 4 | url: https://xrpl.org/ 5 | about: All things about XRPL 6 | - name: General question for the community 7 | url: https://forum.xpring.io/c/community/ 8 | about: Please ask and answer questions here. 9 | - name: Security bug bounty program 10 | url: https://ripple.com/bug-bounty/ 11 | about: Please report security-relevant bugs in our software here. 12 | -------------------------------------------------------------------------------- /src/eth/evmc/examples/example_vm/example_vm.h: -------------------------------------------------------------------------------- 1 | /* EVMC: Ethereum Client-VM Connector API. 2 | * Copyright 2018-2019 The EVMC Authors. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /** 16 | * Creates EVMC Example VM. 17 | */ 18 | EVMC_EXPORT struct evmc_vm* evmc_create_example_vm(void); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/source/m3_bind.h: -------------------------------------------------------------------------------- 1 | // 2 | // m3_bind.h 3 | // 4 | // Created by Steven Massey on 2/27/20. 5 | // Copyright © 2020 Steven Massey. All rights reserved. 6 | // 7 | 8 | #ifndef m3_bind_h 9 | #define m3_bind_h 10 | 11 | #include "m3_env.h" 12 | 13 | d_m3BeginExternC 14 | 15 | u8 ConvertTypeCharToTypeId (char i_code); 16 | M3Result SignatureToFuncType (IM3FuncType * o_functionType, ccstr_t i_signature); 17 | 18 | d_m3EndExternC 19 | 20 | #endif /* m3_bind_h */ 21 | -------------------------------------------------------------------------------- /src/eth/api/utils/TransactionSkeleton.h: -------------------------------------------------------------------------------- 1 | #ifndef ETH_API_UTIL_SKELETON_H_INCLUDED 2 | #define ETH_API_UTIL_SKELETON_H_INCLUDED 3 | 4 | #include 5 | 6 | using namespace eth; 7 | namespace ripple { 8 | class TransactionSkeleton 9 | { 10 | public: 11 | bool creation = false; 12 | h160 from; 13 | h160 to; 14 | u256 value; 15 | bytes data; 16 | u256 nonce = Invalid256; 17 | u256 gas = Invalid256; 18 | u256 gasPrice = Invalid256; 19 | }; 20 | 21 | } 22 | #endif -------------------------------------------------------------------------------- /src/secp256k1/src/java/org_bitcoin_Secp256k1Context.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "org_bitcoin_Secp256k1Context.h" 4 | #include "include/secp256k1.h" 5 | 6 | SECP256K1_API jlong JNICALL Java_org_bitcoin_Secp256k1Context_secp256k1_1init_1context 7 | (JNIEnv* env, jclass classObject) 8 | { 9 | secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); 10 | 11 | (void)classObject;(void)env; 12 | 13 | return (uintptr_t)ctx; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/mal/README.md: -------------------------------------------------------------------------------- 1 | # mal (Make a Lisp) 2 | 3 | [mal](https://github.com/kanaka/mal) is a Lisp interpreter. 4 | 5 | ### Running 6 | 7 | ```sh 8 | # REPL: 9 | ../../../build/wasm3 mal.wasm 10 | 11 | # Self-hosted REPL: 12 | ../../../build/wasm3 mal.wasm ./mal.mal 13 | 14 | # Fibonacci test: 15 | ../../../build/wasm3 mal.wasm ./test-fib.mal 16 16 | 987 17 | 18 | # Self-hosted Fibonacci test (takes ~10 seconds): 19 | ../../../build/wasm3 mal.wasm ./mal.mal ./test-fib.mal 10 20 | 55 21 | ``` 22 | -------------------------------------------------------------------------------- /src/eth/evmc/docs/VM_Tester.md: -------------------------------------------------------------------------------- 1 | # EVMC VM Tester {#vmtester} 2 | 3 | The EVMC project contains a EVMC-compatibility testing tool for VM implementations. 4 | 5 | The tool is called `evmc-vmtester` and to include it in the EVMC build 6 | add `-DEVMC_TESTING=ON` CMake option to the project configuration step. 7 | 8 | Usage is simple as 9 | 10 | ```sh 11 | evmc-vmtester [vm] 12 | ``` 13 | 14 | where `[vm]` is a path to a shared library with VM implementation. 15 | 16 | For more information check `evmc-vmtester --help`. 17 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/source/extra/fib32.wasm.h: -------------------------------------------------------------------------------- 1 | unsigned char fib32_wasm[] = { 2 | 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, 3 | 0x01, 0x7f, 0x01, 0x7f, 0x03, 0x02, 0x01, 0x00, 0x07, 0x07, 0x01, 0x03, 4 | 0x66, 0x69, 0x62, 0x00, 0x00, 0x0a, 0x1f, 0x01, 0x1d, 0x00, 0x20, 0x00, 5 | 0x41, 0x02, 0x49, 0x04, 0x40, 0x20, 0x00, 0x0f, 0x0b, 0x20, 0x00, 0x41, 6 | 0x02, 0x6b, 0x10, 0x00, 0x20, 0x00, 0x41, 0x01, 0x6b, 0x10, 0x00, 0x6a, 7 | 0x0f, 0x0b 8 | }; 9 | unsigned int fib32_wasm_len = 62; 10 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/source/extra/fib64.wasm.h: -------------------------------------------------------------------------------- 1 | unsigned char fib64_wasm[] = { 2 | 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, 3 | 0x01, 0x7e, 0x01, 0x7e, 0x03, 0x02, 0x01, 0x00, 0x07, 0x07, 0x01, 0x03, 4 | 0x66, 0x69, 0x62, 0x00, 0x00, 0x0a, 0x1f, 0x01, 0x1d, 0x00, 0x20, 0x00, 5 | 0x42, 0x02, 0x54, 0x04, 0x40, 0x20, 0x00, 0x0f, 0x0b, 0x20, 0x00, 0x42, 6 | 0x02, 0x7d, 0x10, 0x00, 0x20, 0x00, 0x42, 0x01, 0x7d, 0x10, 0x00, 0x7c, 7 | 0x0f, 0x0b 8 | }; 9 | unsigned int fib64_wasm_len = 62; 10 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/simple/README.md: -------------------------------------------------------------------------------- 1 | ## Compile 2 | 3 | ```sh 4 | wasicc -g -O0 -Wl,--stack-first test.c -o test.wasm 5 | wasm-opt --strip-debug -Os test.wasm -o test-opt.wasm 6 | ``` 7 | 8 | ## Run 9 | 10 | ```sh 11 | ../../build/wasm3 test.wasm 12 | 13 | $ENGINES_PATH/wasm-micro-runtime/core/iwasm/products/linux/build/iwasm test.wasm 14 | 15 | $ENGINES_PATH/wac/wax test.wasm 16 | 17 | $ENGINES_PATH/WAVM/Release/bin/wavm run test.wasm 18 | 19 | wasmer run test.wasm 20 | 21 | wasmer-js run test.wasm 22 | ``` 23 | 24 | -------------------------------------------------------------------------------- /src/eth/evmc/lib/mocked_host/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | add_library(mocked_host INTERFACE) 6 | target_sources(mocked_host INTERFACE $) 7 | 8 | add_library(evmc::mocked_host ALIAS mocked_host) 9 | target_link_libraries(mocked_host INTERFACE evmc::evmc_cpp) 10 | 11 | if(EVMC_INSTALL) 12 | install(TARGETS mocked_host EXPORT evmcTargets) 13 | endif() 14 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf/README.md: -------------------------------------------------------------------------------- 1 | ## Build for ESP-IDF 2 | 3 | Download and install ESP-IDF v4.3-beta1 4 | 5 | ```sh 6 | export IDF_PATH=/opt/esp32/esp-idf 7 | 8 | # Set tools path if needed: 9 | #export IDF_TOOLS_PATH=/opt/esp32 10 | 11 | source $IDF_PATH/export.sh 12 | 13 | idf.py menuconfig 14 | 15 | # Select target: 16 | idf.py set-target esp32 17 | #idf.py set-target esp32s2 18 | #idf.py --preview set-target esp32c3 19 | 20 | idf.py build 21 | 22 | idf.py -p /dev/ttyUSB0 flash monitor 23 | 24 | ``` 25 | -------------------------------------------------------------------------------- /src/eth/evmc/examples/example_precompiles_vm/example_precompiles_vm.h: -------------------------------------------------------------------------------- 1 | /* EVMC: Ethereum Client-VM Connector API. 2 | * Copyright 2019 The EVMC Authors. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | /** 15 | * Creates EVMC Example Precompiles VM. 16 | */ 17 | EVMC_EXPORT struct evmc_vm* evmc_create_example_precompiles_vm(void); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /Builds/CMake/deps/Findlz4.cmake: -------------------------------------------------------------------------------- 1 | find_package (PkgConfig) 2 | if (PKG_CONFIG_FOUND) 3 | pkg_search_module (lz4_PC QUIET liblz4>=1.9) 4 | endif () 5 | 6 | if(static) 7 | set(LZ4_LIB liblz4.a) 8 | else() 9 | set(LZ4_LIB lz4.so) 10 | endif() 11 | 12 | find_library (lz4 13 | NAMES ${LZ4_LIB} 14 | HINTS 15 | ${lz4_PC_LIBDIR} 16 | ${lz4_PC_LIBRARY_DIRS} 17 | NO_DEFAULT_PATH) 18 | 19 | find_path (LZ4_INCLUDE_DIR 20 | NAMES lz4.h 21 | HINTS 22 | ${lz4_PC_INCLUDEDIR} 23 | ${lz4_PC_INCLUDEDIRS} 24 | NO_DEFAULT_PATH) 25 | -------------------------------------------------------------------------------- /src/eth/vm/VMFactory.cpp: -------------------------------------------------------------------------------- 1 | #include "VMFactory.h" 2 | #include "VMC.h" 3 | 4 | //#include 5 | #include 6 | 7 | namespace eth { 8 | 9 | VMFace::pointer VMFactory::create(VMKind kind) { 10 | switch (kind) 11 | { 12 | case VMKind::JIT: 13 | return VMFace::pointer(); 14 | //return VMFace::pointer(new VMC{evmjit_create()}); 15 | case VMKind::Interpreter: 16 | default: 17 | return VMFace::pointer(new VMC{ evmc_create_aleth_interpreter() }); 18 | } 19 | } 20 | 21 | } // namespace ripple -------------------------------------------------------------------------------- /src/ripple/app/consensus/README.md: -------------------------------------------------------------------------------- 1 | # RCL Consensus 2 | 3 | This directory holds the types and classes needed 4 | to connect the generic consensus algorithm to the 5 | rippled-specific instance of consensus. 6 | 7 | * `RCLCxTx` adapts a `SHAMapItem` transaction. 8 | * `RCLCxTxSet` adapts a `SHAMap` to represent a set of transactions. 9 | * `RCLCxLedger` adapts a `Ledger`. 10 | * `RCLConsensus` is implements the requirements of the generic 11 | `Consensus` class by connecting to the rest of the `rippled` 12 | application. 13 | 14 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib32.wat: -------------------------------------------------------------------------------- 1 | (module 2 | (export "fib" (func $fib)) 3 | (func $fib (param $n i32) (result i32) 4 | (if 5 | (i32.lt_u 6 | (get_local $n) 7 | (i32.const 2) 8 | ) 9 | (return 10 | (get_local $n) 11 | ) 12 | ) 13 | (return 14 | (i32.add 15 | (call $fib 16 | (i32.sub 17 | (get_local $n) 18 | (i32.const 2) 19 | ) 20 | ) 21 | (call $fib 22 | (i32.sub 23 | (get_local $n) 24 | (i32.const 1) 25 | ) 26 | ) 27 | ) 28 | ) 29 | ) 30 | ) 31 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib64.wat: -------------------------------------------------------------------------------- 1 | (module 2 | (export "fib" (func $fib)) 3 | (func $fib (param $n i64) (result i64) 4 | (if 5 | (i64.lt_u 6 | (get_local $n) 7 | (i64.const 2) 8 | ) 9 | (return 10 | (get_local $n) 11 | ) 12 | ) 13 | (return 14 | (i64.add 15 | (call $fib 16 | (i64.sub 17 | (get_local $n) 18 | (i64.const 2) 19 | ) 20 | ) 21 | (call $fib 22 | (i64.sub 23 | (get_local $n) 24 | (i64.const 1) 25 | ) 26 | ) 27 | ) 28 | ) 29 | ) 30 | ) 31 | -------------------------------------------------------------------------------- /src/intx/test/unittests/test_cases.hpp: -------------------------------------------------------------------------------- 1 | // intx: extended precision integer library. 2 | // Copyright 2019 Pawel Bylica. 3 | // Licensed under the Apache License, Version 2.0. 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace 10 | { 11 | struct arithmetic_test_case 12 | { 13 | intx::uint256 x; 14 | intx::uint256 y; 15 | intx::uint256 sum; 16 | intx::uint256 product; 17 | }; 18 | 19 | arithmetic_test_case arithmetic_test_cases[] = { 20 | {0, 0, 0, 0}, 21 | {127, 1, 128, 127}, 22 | }; 23 | } // namespace 24 | -------------------------------------------------------------------------------- /src/intx/.bumpversion.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 0.4.0 3 | tag = True 4 | sign_tags = True 5 | tag_message = intx {new_version} 6 | commit = True 7 | message = intx {new_version} 8 | 9 | Bump version: {current_version} → {new_version} 10 | parse = (?P\d+)\.(?P\d+)\.(?P\d+)(?P-dev)? 11 | serialize = 12 | {major}.{minor}.{patch}{prerel} 13 | {major}.{minor}.{patch} 14 | 15 | [bumpversion:part:prerel] 16 | optional_value = rel 17 | values = 18 | -dev 19 | rel 20 | 21 | [bumpversion:file:CMakeLists.txt] 22 | 23 | -------------------------------------------------------------------------------- /src/wasmvm/vm/impl/chainsqlWasmVm.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace chainsql { 4 | 5 | chainsqlWasmVm::chainsqlWasmVm(size_t stack_size_bytes) throw() 6 | : env_() 7 | , runtime_(env_.new_runtime(stack_size_bytes)) { 8 | 9 | } 10 | 11 | chainsqlWasmVm::~chainsqlWasmVm() { 12 | 13 | } 14 | 15 | wasm3::module chainsqlWasmVm::loadWasm(const uint8_t *data, size_t size) throw() { 16 | wasm3::module mod = env_.parse_module(data, size); 17 | runtime_.load(mod); 18 | mod.link_libc(); 19 | return mod; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/peersafe/app/bloom/BloomHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace ripple { 9 | class BloomHelper 10 | { 11 | public: 12 | BloomHelper(); 13 | 14 | void clearLogCache(); 15 | void addContractLog(AccountID const& address,Json::Value const& log); 16 | uint2048 calcBloom(); 17 | 18 | private: 19 | std::vector> vecLogs_; 20 | }; 21 | 22 | } // namespace ripple 23 | -------------------------------------------------------------------------------- /Builds/containers/gitlab-ci/docker_alpine_setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -ex 3 | # used as a before/setup script for docker steps in gitlab-ci 4 | # expects to be run in standard alpine/dind image 5 | echo $(nproc) 6 | docker login -u rippled \ 7 | -p ${ARTIFACTORY_DEPLOY_KEY_RIPPLED} ${ARTIFACTORY_HUB} 8 | apk add --update py-pip 9 | apk add \ 10 | bash util-linux coreutils binutils grep \ 11 | make ninja cmake build-base gcc g++ abuild git \ 12 | python3 python3-dev 13 | pip3 install awscli 14 | # list curdir contents to build log: 15 | ls -la 16 | 17 | -------------------------------------------------------------------------------- /src/eth/evmc/examples/example_host.h: -------------------------------------------------------------------------------- 1 | /* EVMC: Ethereum Client-VM Connector API. 2 | * Copyright 2016-2019 The EVMC Authors. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | 6 | #include 7 | 8 | #if __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | const struct evmc_host_interface* example_host_get_interface(); 13 | 14 | struct evmc_host_context* example_host_create_context(struct evmc_tx_context tx_context); 15 | 16 | void example_host_destroy_context(struct evmc_host_context* context); 17 | 18 | #if __cplusplus 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf-wasi/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE M3_SOURCES "wasm3/*.c") 2 | 3 | set(APP_SOURCES "main.cpp" "m3_api_esp_wasi.c") 4 | 5 | idf_component_register(SRCS ${APP_SOURCES} ${M3_SOURCES} 6 | INCLUDE_DIRS "wasm3") 7 | 8 | target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-error -O3 -DESP32 -Dd_m3MaxFunctionStackHeight=256) 9 | 10 | # Disable harmless warnings 11 | target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers) 12 | -------------------------------------------------------------------------------- /src/peersafe/precompiled/Define.h: -------------------------------------------------------------------------------- 1 | #ifndef PRECOMPILED_DEFINE_H_INCLUDE 2 | #define PRECOMPILED_DEFINE_H_INCLUDE 3 | 4 | #include 5 | 6 | namespace ripple { 7 | const AccountID TABLE_OPERATION_ADDR = AccountID(0x1001); //zzzzzzzzzzzzzzzzzzz3yHctrGe 8 | const AccountID TOOLS_PRE_ADDR = AccountID(0x1002); 9 | 10 | // preCompiledContract address for function 11 | const AccountID SM3_ADDR = AccountID(0x4000); 12 | const AccountID EN_BASE58_ADDR = AccountID(0x4001); 13 | const AccountID DE_BASE58_ADDR = AccountID(0x4002); 14 | 15 | } 16 | 17 | #endif -------------------------------------------------------------------------------- /src/wasmvm/vm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(sources 2 | "./impl/chainsqlWasmVm.cc" 3 | "./impl/action.cc" 4 | ) 5 | 6 | set(headers 7 | "./chainsqlWasmVm.h" 8 | "./actionCallback.h" 9 | "./action.h" 10 | ) 11 | 12 | add_library(wasmvm STATIC ${sources} ${headers}) 13 | 14 | include_directories( 15 | ${CMAKE_SOURCE_DIR}/src/wasmvm 16 | ) 17 | 18 | target_include_directories( 19 | wasmvm 20 | PUBLIC 21 | ${CMAKE_SOURCE_DIR}/src/wasmvm 22 | ${CMAKE_SOURCE_DIR}/src/wasmvm/wasm3/source 23 | ) 24 | 25 | target_compile_features(wasmvm PRIVATE cxx_std_17) 26 | -------------------------------------------------------------------------------- /Builds/CMake/deps/Findsnappy.cmake: -------------------------------------------------------------------------------- 1 | find_package (PkgConfig) 2 | if (PKG_CONFIG_FOUND) 3 | pkg_search_module (snappy_PC QUIET snappy>=1.1.7) 4 | endif () 5 | 6 | if(static) 7 | set(SNAPPY_LIB libsnappy.a) 8 | else() 9 | set(SNAPPY_LIB libsnappy.so) 10 | endif() 11 | 12 | find_library (snappy 13 | NAMES ${SNAPPY_LIB} 14 | HINTS 15 | ${snappy_PC_LIBDIR} 16 | ${snappy_PC_LIBRARY_DIRS} 17 | NO_DEFAULT_PATH) 18 | 19 | find_path (SNAPPY_INCLUDE_DIR 20 | NAMES snappy.h 21 | HINTS 22 | ${snappy_PC_INCLUDEDIR} 23 | ${snappy_PC_INCLUDEDIRS} 24 | NO_DEFAULT_PATH) 25 | -------------------------------------------------------------------------------- /src/eth/evmc/.travis.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | only: 3 | - master 4 | - /^release\/.*$/ 5 | - travis 6 | 7 | matrix: 8 | include: 9 | - language: cpp 10 | os: windows 11 | 12 | cache: 13 | directories: 14 | - C:/Users/travis/.hunter/_Base/Cache 15 | 16 | install: 17 | - cmake --version 18 | - mkdir build && cd build 19 | - cmake .. -G "Visual Studio 15 2017 Win64" -DEVMC_TESTING=ON -DCMAKE_INSTALL_PREFIX=$HOME 20 | - cmake --build . --config Release --target install 21 | 22 | script: 23 | - ctest -C Release -j4 --schedule-random --output-on-failure 24 | -------------------------------------------------------------------------------- /src/eth/evmc/examples/use_instructions_in_cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2018-2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | # This example shows how to use evmc::instructions library from evmc CMake package. 6 | 7 | cmake_minimum_required(VERSION 3.5) 8 | 9 | project(use_instructions_in_cmake) 10 | 11 | find_package(evmc CONFIG REQUIRED) 12 | 13 | add_executable(use_instructions_in_cmake use_instructions_in_cmake.c) 14 | target_link_libraries(use_instructions_in_cmake PRIVATE evmc::instructions) 15 | -------------------------------------------------------------------------------- /Builds/CMake/deps/Findsqlite.cmake: -------------------------------------------------------------------------------- 1 | find_package (PkgConfig) 2 | if (PKG_CONFIG_FOUND) 3 | pkg_search_module (sqlite_PC QUIET sqlite3>=3.26.0) 4 | endif () 5 | 6 | if(static) 7 | set(SQLITE_LIB libsqlite3.a) 8 | else() 9 | set(SQLITE_LIB sqlite3.so) 10 | endif() 11 | 12 | find_library (sqlite3 13 | NAMES ${SQLITE_LIB} 14 | HINTS 15 | ${sqlite_PC_LIBDIR} 16 | ${sqlite_PC_LIBRARY_DIRS} 17 | NO_DEFAULT_PATH) 18 | 19 | find_path (SQLITE_INCLUDE_DIR 20 | NAMES sqlite3.h 21 | HINTS 22 | ${sqlite_PC_INCLUDEDIR} 23 | ${sqlite_PC_INCLUDEDIRS} 24 | NO_DEFAULT_PATH) 25 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/Hunter/config.cmake: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2018-2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | # Local Hunter configuration. 6 | 7 | set(gtest_cxx_flags "${CMAKE_CXX_FLAGS_INIT} -DGTEST_HAS_TR1_TUPLE=0") 8 | 9 | hunter_config( 10 | GTest 11 | VERSION 1.8.1 12 | URL https://github.com/google/googletest/archive/release-1.8.1.tar.gz 13 | SHA1 152b849610d91a9dfa1401293f43230c2e0c33f8 14 | CMAKE_ARGS BUILD_GMOCK=OFF gtest_force_shared_crt=ON CMAKE_CXX_FLAGS=${gtest_cxx_flags} 15 | ) 16 | -------------------------------------------------------------------------------- /src/intx/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # intx: extended precision integer library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(intx_internal_include_dir ${PROJECT_SOURCE_DIR}/lib/intx) 6 | 7 | if(INTX_TESTING OR INTX_BENCHMARKING) 8 | add_subdirectory(experimental) 9 | endif() 10 | 11 | if(INTX_TESTING) 12 | add_subdirectory(integration) 13 | add_subdirectory(unittests) 14 | endif() 15 | 16 | if(INTX_BENCHMARKING) 17 | add_subdirectory(benchmarks) 18 | endif() 19 | 20 | if(INTX_FUZZING) 21 | add_subdirectory(fuzzer) 22 | endif() 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest a new feature for the rippled project 4 | title: "[Title with short description] (Version: [rippled version])" 5 | labels: Feature Request 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | ## Summary 12 | 13 | 14 | ## Motivation 15 | 16 | 17 | ## Solution 18 | 19 | 20 | ## Paths Not Taken 21 | 22 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | before_script: 2 | - echo "add remote repository of github" 3 | - git remote add -f github git@github.com:ChainSQL/chainsqld.git 4 | 5 | after_script: 6 | - echo "remove remote repository of github" 7 | - git remote remove github 8 | 9 | 10 | deployToGithub: 11 | stage: deploy 12 | script: 13 | - echo "push $CI_COMMIT_REF_NAME to github" 14 | - git push github HEAD:$CI_COMMIT_REF_NAME 15 | environment: 16 | name: github 17 | url: https://github.com/ChainSQL/chainsqld 18 | tags: 19 | - chainsqld 20 | only: 21 | refs: 22 | - master 23 | - develop 24 | -------------------------------------------------------------------------------- /Builds/CMake/deps/Findsecp256k1.cmake: -------------------------------------------------------------------------------- 1 | find_package (PkgConfig) 2 | if (PKG_CONFIG_FOUND) 3 | pkg_search_module (secp256k1_PC QUIET libsecp256k1) 4 | endif () 5 | 6 | if(static) 7 | set(SECP256K1_LIB libsecp256k1.a) 8 | else() 9 | set(SECP256K1_LIB secp256k1) 10 | endif() 11 | 12 | find_library(secp256k1 13 | NAMES ${SECP256K1_LIB} 14 | HINTS 15 | ${secp256k1_PC_LIBDIR} 16 | ${secp256k1_PC_LIBRARY_PATHS} 17 | NO_DEFAULT_PATH) 18 | 19 | find_path (SECP256K1_INCLUDE_DIR 20 | NAMES secp256k1.h 21 | HINTS 22 | ${secp256k1_PC_INCLUDEDIR} 23 | ${secp256k1_PC_INCLUDEDIRS} 24 | NO_DEFAULT_PATH) 25 | -------------------------------------------------------------------------------- /src/eth/evmc/Docker.md: -------------------------------------------------------------------------------- 1 | # Rippled Docker Image 2 | 3 | Rippled has a continuous deployment pipeline that turns every git commit into a 4 | docker image for quick testing and deployment. 5 | 6 | To run the tip of the latest release via docker: 7 | 8 | ```$ docker run -P -v /srv/rippled/ ripple/rippled:latest``` 9 | 10 | To run the tip of active development: 11 | 12 | ```$ docker run -P -v /srv/rippled/ ripple/rippled:develop``` 13 | 14 | Where ```/srv/rippled``` points to a directory containing a rippled.cfg and 15 | database files. By default, port 5005/tcp maps to the RPC port and 51235/udp to 16 | the peer port. 17 | -------------------------------------------------------------------------------- /docs/Docker.md: -------------------------------------------------------------------------------- 1 | # Rippled Docker Image 2 | 3 | Rippled has a continuous deployment pipeline that turns every git commit into a 4 | docker image for quick testing and deployment. 5 | 6 | To run the tip of the latest release via docker: 7 | 8 | ```$ docker run -P -v /srv/rippled/ ripple/rippled:latest``` 9 | 10 | To run the tip of active development: 11 | 12 | ```$ docker run -P -v /srv/rippled/ ripple/rippled:develop``` 13 | 14 | Where ```/srv/rippled``` points to a directory containing a rippled.cfg and 15 | database files. By default, port 5005/tcp maps to the RPC port and 51235/udp to 16 | the peer port. 17 | -------------------------------------------------------------------------------- /src/peersafe/unity/gm_encrypt.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-pio/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [env:esp32dev] 12 | platform = espressif32 13 | board = esp32dev 14 | framework = espidf 15 | 16 | monitor_speed = 115200 17 | 18 | board_build.f_cpu = 240000000L 19 | -------------------------------------------------------------------------------- /Builds/CMake/deps/Findlibarchive_pc.cmake: -------------------------------------------------------------------------------- 1 | find_package (PkgConfig) 2 | if (PKG_CONFIG_FOUND) 3 | pkg_search_module (libarchive_PC QUIET libarchive>=3.4.3) 4 | endif () 5 | 6 | if(static) 7 | set(LIBARCHIVE_LIB libarchive.a) 8 | else() 9 | set(LIBARCHIVE_LIB archive) 10 | endif() 11 | 12 | find_library (archive 13 | NAMES ${LIBARCHIVE_LIB} 14 | HINTS 15 | ${libarchive_PC_LIBDIR} 16 | ${libarchive_PC_LIBRARY_DIRS} 17 | NO_DEFAULT_PATH) 18 | 19 | find_path (LIBARCHIVE_INCLUDE_DIR 20 | NAMES archive.h 21 | HINTS 22 | ${libarchive_PC_INCLUDEDIR} 23 | ${libarchive_PC_INCLUDEDIRS} 24 | NO_DEFAULT_PATH) 25 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/source/extra/fib32_tail.wasm.h: -------------------------------------------------------------------------------- 1 | unsigned char fib32_tail_wasm[] = { 2 | 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0d, 0x02, 0x60, 3 | 0x03, 0x7f, 0x7f, 0x7f, 0x01, 0x7f, 0x60, 0x01, 0x7f, 0x01, 0x7f, 0x03, 4 | 0x03, 0x02, 0x00, 0x01, 0x07, 0x07, 0x01, 0x03, 0x66, 0x69, 0x62, 0x00, 5 | 0x01, 0x0a, 0x26, 0x02, 0x19, 0x00, 0x20, 0x00, 0x45, 0x04, 0x7f, 0x20, 6 | 0x01, 0x05, 0x20, 0x00, 0x41, 0x01, 0x6b, 0x20, 0x02, 0x20, 0x01, 0x20, 7 | 0x02, 0x6a, 0x12, 0x00, 0x0b, 0x0b, 0x0a, 0x00, 0x20, 0x00, 0x41, 0x00, 8 | 0x41, 0x01, 0x12, 0x00, 0x0b 9 | }; 10 | unsigned int fib32_tail_wasm_len = 77; 11 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.4.1) 2 | 3 | add_definitions(-DANDROID -Wno-format-security -O3 4 | #-fno-optimize-sibling-calls 5 | -flto -fomit-frame-pointer -fno-stack-check -fno-stack-protector) 6 | 7 | file(GLOB M3_SRC FOLLOW_SYMLINKS "m3/*.c" "*.c") 8 | 9 | add_library(wasm3-jni SHARED ${M3_SRC}) 10 | 11 | set_target_properties(wasm3-jni PROPERTIES LINK_FLAGS "-flto -O3") 12 | 13 | # Include libraries needed for wasm3-jni lib 14 | target_link_libraries(wasm3-jni 15 | android 16 | log) 17 | -------------------------------------------------------------------------------- /src/secp256k1/src/scalar_low.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * Copyright (c) 2015 Andrew Poelstra * 3 | * Distributed under the MIT software license, see the accompanying * 4 | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* 5 | **********************************************************************/ 6 | 7 | #ifndef _SECP256K1_SCALAR_REPR_ 8 | #define _SECP256K1_SCALAR_REPR_ 9 | 10 | #include 11 | 12 | /** A scalar modulo the group order of the secp256k1 curve. */ 13 | typedef uint32_t secp256k1_scalar; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/include/console.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONSOLE_H 2 | #define __CONSOLE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef void (*console_write_hook)(char); 9 | typedef char (*console_read_hook)(void); 10 | typedef int (*console_read_nonblock_hook)(void); 11 | 12 | void console_set_write_hook(console_write_hook h); 13 | void console_set_read_hook(console_read_hook r, console_read_nonblock_hook rn); 14 | 15 | char readchar(void); 16 | int readchar_nonblock(void); 17 | 18 | void putsnonl(const char *s); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif /* __CONSOLE_H */ 25 | -------------------------------------------------------------------------------- /Builds/CMake/ChainsqldVersion.cmake: -------------------------------------------------------------------------------- 1 | #[===================================================================[ 2 | read version from source 3 | #]===================================================================] 4 | 5 | file (STRINGS src/ripple/protocol/impl/BuildInfo.cpp BUILD_INFO) 6 | foreach (line_ ${BUILD_INFO}) 7 | if (line_ MATCHES "versionString[ ]*=[ ]*\"(.+)\"") 8 | set (chainsqld_version ${CMAKE_MATCH_1}) 9 | endif () 10 | endforeach () 11 | if (chainsqld_version) 12 | message (STATUS "chainsqld version: ${chainsqld_version}") 13 | else () 14 | message (FATAL_ERROR "unable to determine chainsqld version") 15 | endif () 16 | -------------------------------------------------------------------------------- /src/peersafe/precompiled/ToolsPrecompiled.h: -------------------------------------------------------------------------------- 1 | #ifndef PRECOMPILED_TOOLS_H_INCLUDE 2 | #define PRECOMPILED_TOOLS_H_INCLUDE 3 | 4 | #include 5 | 6 | namespace ripple { 7 | class ToolsPrecompiled : public PrecompiledDiyBase 8 | { 9 | public: 10 | ToolsPrecompiled(); 11 | 12 | std::string toString() override; 13 | 14 | std::tuple 15 | execute( 16 | SleOps& _s, 17 | eth::bytesConstRef _in, 18 | AccountID const& caller = AccountID(), 19 | AccountID const& origin = AccountID()) override; 20 | }; 21 | } // namespace ripple 22 | 23 | #endif -------------------------------------------------------------------------------- /Builds/CMake/echo_file.cmake: -------------------------------------------------------------------------------- 1 | #[=========================================================[ 2 | This is a CMake script file that is used to write 3 | the contents of a file to stdout (using the cmake 4 | echo command). The input file is passed via the 5 | IN_FILE variable. 6 | #]=========================================================] 7 | 8 | if (EXISTS ${IN_FILE}) 9 | file (READ ${IN_FILE} contents) 10 | ## only print files that actually have some text in them 11 | if (contents MATCHES "[a-z0-9A-Z]+") 12 | execute_process( 13 | COMMAND 14 | ${CMAKE_COMMAND} -E echo "${contents}") 15 | endif () 16 | endif () 17 | 18 | -------------------------------------------------------------------------------- /src/peersafe/app/table/TokenProcess.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef TOKEN_PROCESS_H_INCLUDE 4 | #define TOKEN_PROCESS_H_INCLUDE 5 | 6 | #include 7 | #include 8 | 9 | namespace ripple { 10 | 11 | class TokenProcess 12 | { 13 | private: 14 | Blob passBlob; 15 | void* sm4Handle; 16 | int secretkeyType; 17 | public: 18 | bool isValidate; 19 | public: 20 | TokenProcess(); 21 | ~TokenProcess(); 22 | bool setSymmertryKey(const Blob& cipherBlob, const SecretKey& secret_key); 23 | Blob symmertryDecrypt(Blob rawEncrept, const PublicKey& publicKey); 24 | }; 25 | 26 | } 27 | 28 | #endif -------------------------------------------------------------------------------- /src/peersafe/precompiled/TableOpPrecompiled.h: -------------------------------------------------------------------------------- 1 | #ifndef PRECOMPILED_TABLE_OP_H_INCLUDE 2 | #define PRECOMPILED_TABLE_OP_H_INCLUDE 3 | 4 | #include 5 | 6 | namespace ripple { 7 | class TableOpPrecompiled : public PrecompiledDiyBase 8 | { 9 | public: 10 | TableOpPrecompiled(); 11 | std::string toString() override; 12 | 13 | std::tuple 14 | execute( 15 | SleOps& _s, 16 | eth::bytesConstRef _in, 17 | AccountID const& caller = AccountID(), 18 | AccountID const& origin = AccountID()) override; 19 | }; 20 | } // namespace ripple 21 | 22 | #endif -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/ios/README.md: -------------------------------------------------------------------------------- 1 | ## Build for iOS 2 | 3 |


4 | Wasm3 running on iPhone 8 5 |

6 | 7 | 8 | Install Xcode, then open and build the project as usual. 9 | 10 | **Note:** Xcode runs apps in `Debug` mode by default. Select `Release` mode for significantly better performance. 11 | 12 | You can also build the project from command line: 13 | 14 | ```sh 15 | xcodebuild build -scheme wasm3 -project wasm3.xcodeproj -configuration Release -destination 'platform=iOS Simulator,name=iPhone 11,OS=13.3' 16 | ``` 17 | 18 | -------------------------------------------------------------------------------- /src/eth/evmc/lib/loader/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2018-2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | add_library( 6 | loader STATIC 7 | ${include_dir}/evmc/loader.h 8 | loader.c 9 | ) 10 | 11 | add_library(evmc::loader ALIAS loader) 12 | set_target_properties(loader PROPERTIES 13 | OUTPUT_NAME evmc-loader 14 | POSITION_INDEPENDENT_CODE TRUE 15 | ) 16 | target_link_libraries(loader INTERFACE ${CMAKE_DL_LIBS} PUBLIC evmc::evmc) 17 | 18 | if(EVMC_INSTALL) 19 | install(TARGETS loader EXPORT evmcTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}) 20 | endif() -------------------------------------------------------------------------------- /src/eth/vm/executor/interpreter/interpreter.h: -------------------------------------------------------------------------------- 1 | // Aleth: Ethereum C++ client, tools and libraries. 2 | // Copyright 2018-2019 Aleth Authors. 3 | // Licensed under the GNU General Public License, Version 3. 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | //#define EVMC_EXPORT 10 | // 11 | //#if __cplusplus 12 | //#define EVMC_NOEXCEPT noexcept 13 | //#else 14 | //#define EVMC_NOEXCEPT 15 | //#endif 16 | 17 | #if __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | EVMC_EXPORT struct evmc_vm* evmc_create_aleth_interpreter() EVMC_NOEXCEPT; 22 | 23 | #if __cplusplus 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf-wasi/README.md: -------------------------------------------------------------------------------- 1 | ## Build for ESP-IDF, with minimal WASI support 2 | 3 | **Note:** Currently, to run this example you need a PSRAM-enabled ESP32 module (this might be improved in future). 4 | 5 | Download and install ESP-IDF v4.0 6 | 7 | ```sh 8 | export IDF_PATH=/opt/esp32/esp-idf 9 | 10 | # Set tools path if needed: 11 | #export IDF_TOOLS_PATH=/opt/esp32 12 | 13 | source $IDF_PATH/export.sh 14 | 15 | idf.py menuconfig 16 | 17 | # Select target: 18 | idf.py set-target esp32 # or: esp32s2, esp32c3, esp32s3, linux 19 | 20 | idf.py build 21 | 22 | idf.py -p /dev/ttyUSB0 flash monitor 23 | 24 | ``` 25 | -------------------------------------------------------------------------------- /Builds/containers/gitlab-ci/verify_head_commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -ex 3 | apt -y update 4 | DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata 5 | apt -y install software-properties-common curl git gnupg 6 | curl -sk -o rippled-pubkeys.txt "${GIT_SIGN_PUBKEYS_URL}" 7 | gpg --import rippled-pubkeys.txt 8 | if git verify-commit HEAD; then 9 | echo "git commit signature check passed" 10 | else 11 | echo "git commit signature check failed" 12 | git log -n 5 --color \ 13 | --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an> [%G?]%Creset' \ 14 | --abbrev-commit 15 | exit 1 16 | fi 17 | 18 | -------------------------------------------------------------------------------- /src/intx/examples/use_cmake_package/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # intx: extended precision integer library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | # This example shows how to use intx CMake package. 6 | 7 | cmake_minimum_required(VERSION 3.5) 8 | 9 | project(use_evmc_in_cmake LANGUAGES CXX) 10 | set(CMAKE_CXX_STANDARD 14) 11 | set(CMAKE_CXX_EXTENSIONS OFF) 12 | 13 | find_package(intx CONFIG REQUIRED) 14 | 15 | add_executable(use_int128 use_int128.cpp) 16 | target_link_libraries(use_int128 PRIVATE intx::int128) 17 | 18 | add_executable(use_intx use_intx.cpp) 19 | target_link_libraries(use_intx PRIVATE intx::intx) 20 | -------------------------------------------------------------------------------- /src/secp256k1/src/ecmult_const.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * Copyright (c) 2015 Andrew Poelstra * 3 | * Distributed under the MIT software license, see the accompanying * 4 | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* 5 | **********************************************************************/ 6 | 7 | #ifndef _SECP256K1_ECMULT_CONST_ 8 | #define _SECP256K1_ECMULT_CONST_ 9 | 10 | #include "scalar.h" 11 | #include "group.h" 12 | 13 | static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *q); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/README.md: -------------------------------------------------------------------------------- 1 | ## Build for Fomu 2 | 3 | ```sh 4 | export PATH=/opt/fomu-toolchain-linux_x86_64-v1.5.6/bin:$PATH 5 | make 6 | ``` 7 | 8 | ### Upload: 9 | 10 | ```sh 11 | dfu-util -D wasm3.dfu 12 | ``` 13 | 14 | ## Hints 15 | 16 | ```sh 17 | # To reboot fomu: 18 | wishbone-tool 0xe0006000 0xac 19 | 20 | # To run previously flashed program on Fomu: 21 | dfu-util -e 22 | ``` 23 | 24 | ## Debugging 25 | 26 | ```sh 27 | wishbone-tool -s gdb 28 | ``` 29 | On second tab: 30 | ```sh 31 | riscv64-unknown-elf-gdb wasm3.elf -ex 'target remote localhost:1234' 32 | 33 | b m3_CallWithArgs 34 | print *(uint64_t*)env->stack 35 | 36 | ``` 37 | -------------------------------------------------------------------------------- /src/secp256k1/src/java/org_bitcoin_Secp256k1Context.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | #include "include/secp256k1.h" 4 | /* Header for class org_bitcoin_Secp256k1Context */ 5 | 6 | #ifndef _Included_org_bitcoin_Secp256k1Context 7 | #define _Included_org_bitcoin_Secp256k1Context 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | /* 12 | * Class: org_bitcoin_Secp256k1Context 13 | * Method: secp256k1_init_context 14 | * Signature: ()J 15 | */ 16 | SECP256K1_API jlong JNICALL Java_org_bitcoin_Secp256k1Context_secp256k1_1init_1context 17 | (JNIEnv *, jclass); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/extra/disasm-func.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Utility to disassemble a specific function. 3 | # Usage: 4 | # ./disasm-func.sh ../build/wasm3 i32_Divide_sr 5 | # 6 | 7 | FILE="$1" 8 | FUNC="$2" 9 | 10 | # get starting address and size of function fact from nm 11 | ADDR=$(nm --print-size --radix=d $FILE | grep $FUNC | cut -d ' ' -f 1,2) 12 | # strip leading 0's to avoid being interpreted by objdump as octal addresses 13 | STARTADDR=$(echo $ADDR | cut -d ' ' -f 1 | sed 's/^0*\(.\)/\1/') 14 | SIZE=$(echo $ADDR | cut -d ' ' -f 2 | sed 's/^0*//') 15 | STOPADDR=$(( $STARTADDR + $SIZE )) 16 | 17 | objdump --disassemble $FILE --start-address=$STARTADDR --stop-address=$STOPADDR -M suffix 18 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/extra/wapm-package/wapm.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vshymanskyy/wasm3" 3 | version = "0.5.0" 4 | description = "🚀 The fastest WebAssembly interpreter. You can finally run WebAssembly on WebAssembly 😆" 5 | readme = "README.md" 6 | repository = "https://github.com/wasm3/wasm3" 7 | homepage = "https://github.com/wasm3/wasm3" 8 | 9 | [[module]] 10 | name = "wasm3" 11 | source = "build/wasm3-wasi.wasm" 12 | abi = "wasi" 13 | 14 | [[module]] 15 | name = "wasm3-strace" 16 | source = "build/wasm3-strace.wasm" 17 | abi = "wasi" 18 | 19 | [[command]] 20 | name = "wasm3" 21 | module = "wasm3" 22 | 23 | [[command]] 24 | name = "wasm3-strace" 25 | module = "wasm3-strace" 26 | -------------------------------------------------------------------------------- /src/eth/evmc/tools/evmc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | hunter_add_package(CLI11) 6 | find_package(CLI11 REQUIRED) 7 | 8 | add_executable(evmc-tool main.cpp utils.cpp utils.hpp) 9 | add_executable(evmc::tool ALIAS evmc-tool) 10 | set_target_properties(evmc-tool PROPERTIES 11 | OUTPUT_NAME evmc 12 | RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) 13 | set_source_files_properties(main.cpp PROPERTIES 14 | COMPILE_DEFINITIONS PROJECT_VERSION="${PROJECT_VERSION}") 15 | target_link_libraries(evmc-tool PRIVATE evmc::mocked_host evmc::loader CLI11::CLI11) -------------------------------------------------------------------------------- /src/intx/cmake/cable/defaults/HunterCacheServers-passwords.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | # Hunter passwords file used by HunterCacheServers.cmake. 6 | # Do not include directly. 7 | 8 | hunter_upload_password( 9 | # REPO_OWNER + REPO = https://github.com/ethereum/hunter-cache 10 | REPO_OWNER ethereum 11 | REPO hunter-cache 12 | 13 | # USERNAME = https://github.com/hunter-cache-bot 14 | USERNAME hunter-cache-bot 15 | 16 | # PASSWORD = GitHub token saved as a secure environment variable 17 | PASSWORD "$ENV{HUNTER_CACHE_TOKEN}" 18 | ) 19 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/defaults/HunterCacheServers-passwords.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | # Hunter passwords file used by HunterCacheServers.cmake. 6 | # Do not include directly. 7 | 8 | hunter_upload_password( 9 | # REPO_OWNER + REPO = https://github.com/ethereum/hunter-cache 10 | REPO_OWNER ethereum 11 | REPO hunter-cache 12 | 13 | # USERNAME = https://github.com/hunter-cache-bot 14 | USERNAME hunter-cache-bot 15 | 16 | # PASSWORD = GitHub token saved as a secure environment variable 17 | PASSWORD "$ENV{HUNTER_CACHE_TOKEN}" 18 | ) 19 | -------------------------------------------------------------------------------- /src/peersafe/precompiled/Utils.h: -------------------------------------------------------------------------------- 1 | #ifndef PRECOMPILED_UTILS_H_INCLUDE 2 | #define PRECOMPILED_UTILS_H_INCLUDE 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | using namespace eth; 12 | namespace ripple { 13 | uint32_t 14 | getParamFunc(bytesConstRef _param); 15 | 16 | bytesConstRef 17 | getParamData(bytesConstRef _param); 18 | 19 | uint32_t 20 | getFuncSelectorByFunctionName(std::string const& _functionName); 21 | 22 | uint256 23 | eth_sha256(Slice const& slice); 24 | 25 | } // namespace ripple 26 | #endif -------------------------------------------------------------------------------- /Builds/containers/shared/update_sources.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function error { 4 | echo $1 5 | exit 1 6 | } 7 | 8 | cd /opt/rippled_bld/pkg/rippled 9 | export RIPPLED_VERSION=$(egrep -i -o "\b(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9a-z\-]+(\.[0-9a-z\-]+)*)?(\+[0-9a-z\-]+(\.[0-9a-z\-]+)*)?\b" src/ripple/protocol/impl/BuildInfo.cpp) 10 | 11 | : ${PKG_OUTDIR:=/opt/rippled_bld/pkg/out} 12 | export PKG_OUTDIR 13 | if [ ! -d ${PKG_OUTDIR} ]; then 14 | error "${PKG_OUTDIR} is not mounted" 15 | fi 16 | 17 | if [ -x ${OPENSSL_ROOT}/bin/openssl ]; then 18 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${OPENSSL_ROOT}/lib ${OPENSSL_ROOT}/bin/openssl version -a 19 | fi 20 | 21 | -------------------------------------------------------------------------------- /src/intx/test/benchmarks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # intx: extended precision integer library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | hunter_add_package(benchmark) 6 | find_package(benchmark CONFIG REQUIRED) 7 | 8 | find_package(GMP REQUIRED) 9 | 10 | add_executable(intx-bench 11 | bench_builtins.cpp 12 | bench_div.cpp 13 | bench_int128.cpp 14 | benchmarks.cpp 15 | utils.cpp 16 | ) 17 | target_link_libraries(intx-bench PRIVATE intx intx::experimental benchmark::benchmark GMP::gmp) 18 | target_include_directories(intx-bench PRIVATE ${intx_internal_include_dir}) 19 | set_target_properties(intx-bench PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..) 20 | -------------------------------------------------------------------------------- /src/secp256k1/src/num_gmp.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * Copyright (c) 2013, 2014 Pieter Wuille * 3 | * Distributed under the MIT software license, see the accompanying * 4 | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* 5 | **********************************************************************/ 6 | 7 | #ifndef _SECP256K1_NUM_REPR_ 8 | #define _SECP256K1_NUM_REPR_ 9 | 10 | #include 11 | 12 | #define NUM_LIMBS ((256+GMP_NUMB_BITS-1)/GMP_NUMB_BITS) 13 | 14 | typedef struct { 15 | mp_limb_t data[2*NUM_LIMBS]; 16 | int neg; 17 | int limbs; 18 | } secp256k1_num; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/eth/evmc/examples/use_evmc_in_cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2018-2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | # This example shows how to use evmc INTERFACE library from evmc CMake package. 6 | 7 | cmake_minimum_required(VERSION 3.5) 8 | 9 | project(use_evmc_in_cmake) 10 | 11 | find_package(evmc CONFIG REQUIRED) 12 | 13 | add_executable(use_evmc_in_cmake use_evmc_in_cmake.c) 14 | target_link_libraries(use_evmc_in_cmake PRIVATE evmc::evmc) 15 | 16 | 17 | 18 | # Only for integration tests. 19 | if(NOT COMMAND evmc_add_vm_test) 20 | message(FATAL_ERROR "Function evmc_add_vm_test() not in EVMC.cmake module") 21 | endif() 22 | -------------------------------------------------------------------------------- /src/eth/evmc/sample_chart.doc: -------------------------------------------------------------------------------- 1 | /*! 2 | \page somestatechart Example state diagram 3 | 4 | \startuml SomeState "my state diagram" 5 | scale 600 width 6 | 7 | [*] -> State1 8 | State1 --> State2 : Succeeded 9 | State1 --> [*] : Aborted 10 | State2 --> State3 : Succeeded 11 | State2 --> [*] : Aborted 12 | state State3 { 13 | state "Accumulate Enough Data\nLong State Name" as long1 14 | long1 : Just a test 15 | [*] --> long1 16 | long1 --> long1 : New Data 17 | long1 --> ProcessData : Enough Data 18 | } 19 | State3 --> State3 : Failed 20 | State3 --> [*] : Succeeded / Save Result 21 | State3 --> [*] : Aborted 22 | 23 | \enduml 24 | */ 25 | -------------------------------------------------------------------------------- /docs/README_CN.md: -------------------------------------------------------------------------------- 1 | [English](../README.md) / 中文 2 | 3 | ![Chainsql](../images/logo.png) 4 | 5 | ## 概述 6 | ChainSQL是全球首个基于区块链的数据库应用平台,我们实现了数据库功能,集成并扩展了以太坊智能合约。你可以像使用传统数据库一样使用ChainSQL。 7 | 8 | ## 快速开始 9 | 阅读[ChainsQL开发文档](http://docs.chainsql.net/),帮助您快速体验ChainSQL强大功能。。 10 | 11 | ## 版本 12 | 历史Release版本请参考[ChainSQL历史版本](https://github.com/ChainSQL/chainsqld/releases),可以直接下载历史版本进行部署。 13 | 14 | ## 部署 15 | 部署方法请参照[ChainSQL部署文档](http://docs.chainsql.net/tutorial/deploy.html) 16 | 17 | ## 编译 18 | 详情参考[Builds](../Builds)目录,不同操作系统有不同的编译方式。 19 | 20 | 21 | ## 联系我们 22 | 邮箱: chainsql@peersafe.info 23 | 24 | 微信: 扫描下方二维码关注“众享比特”公众号,发送消息 **chainsql** 可以得到进入微信群的方法 25 | 26 | 众享比特公众号二维码: 27 | 28 | ![PeerSafe](../images/peersafe.jpg) 29 | 30 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/README.md: -------------------------------------------------------------------------------- 1 | ## Build for Android 2 | 3 |

4 | 5 | Install OpenJDK 15, [Android Command Line Tools](https://developer.android.com/studio#cmdline-tools), then: 6 | 7 | ```sh 8 | export ANDROID_HOME=/opt/android-sdk/ 9 | export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH 10 | ``` 11 | 12 | Install NDK: 13 | ```sh 14 | sdkmanager --install ndk-bundle platform-tools 15 | ``` 16 | 17 | Build: 18 | ```sh 19 | ./gradlew build 20 | ``` 21 | 22 | Install on device: 23 | ``` 24 | adb install -r ./app/build/outputs/apk/debug/app-debug.apk 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/include/rgb.h: -------------------------------------------------------------------------------- 1 | #ifndef _RGB_H_ 2 | #define _RGB_H_ 3 | 4 | void rgb_init(void); 5 | void rgb_set(uint8_t r, uint8_t g, uint8_t b); 6 | 7 | // The amount of time to stay off or on 8 | void rgb_on_time(uint8_t ms); 9 | void rgb_off_time(uint8_t ms); 10 | 11 | // The amount of time to breathe in/out 12 | void rgb_in_time(uint8_t ms); 13 | void rgb_out_time(uint8_t ms); 14 | 15 | enum led_registers { 16 | LEDDCR0 = 8, 17 | LEDDBR = 9, 18 | LEDDONR = 10, 19 | LEDDOFR = 11, 20 | LEDDBCRR = 5, 21 | LEDDBCFR = 6, 22 | LEDDPWRR = 1, 23 | LEDDPWRG = 2, 24 | LEDDPWRB = 3, 25 | }; 26 | 27 | void rgb_write(uint8_t value, uint8_t addr); 28 | 29 | #endif /* _RGB_H_ */ -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib32_tail.wat: -------------------------------------------------------------------------------- 1 | (module 2 | (func $fib2 (param $n i32) (param $a i32) (param $b i32) (result i32) 3 | (if (result i32) 4 | (i32.eqz (get_local $n)) 5 | (then (get_local $a)) 6 | (else (return_call $fib2 (i32.sub (get_local $n) 7 | (i32.const 1)) 8 | (get_local $b) 9 | (i32.add (get_local $a) 10 | (get_local $b)))))) 11 | 12 | (func $fib (param i32) (result i32) 13 | (return_call $fib2 (get_local 0) 14 | (i32.const 0) ;; seed value $a 15 | (i32.const 1))) ;; seed value $b 16 | 17 | (export "fib" (func $fib))) 18 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf-wasi/main/m3_api_esp_wasi.h: -------------------------------------------------------------------------------- 1 | // 2 | // m3_api_esp_wasi.h 3 | // 4 | // Created by Volodymyr Shymanskyy on 01/07/20. 5 | // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. 6 | // 7 | 8 | #ifndef m3_api_esp_wasi_h 9 | #define m3_api_esp_wasi_h 10 | 11 | #include "m3_core.h" 12 | 13 | d_m3BeginExternC 14 | 15 | typedef struct m3_wasi_context_t 16 | { 17 | i32 exit_code; 18 | u32 argc; 19 | ccstr_t * argv; 20 | } m3_wasi_context_t; 21 | 22 | M3Result m3_LinkEspWASI (IM3Module io_module); 23 | 24 | m3_wasi_context_t* m3_GetWasiContext(); 25 | 26 | d_m3EndExternC 27 | 28 | #endif /* m3_api_esp_wasi_h */ 29 | -------------------------------------------------------------------------------- /src/peersafe/app/bloom/Bloom.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace ripple { 7 | class Bloom 8 | { 9 | public: 10 | Bloom(); 11 | Bloom(uint2048 const& bloom); 12 | 13 | void 14 | add(Slice const& data); 15 | 16 | bool 17 | test(Slice const& data); 18 | 19 | uint2048& 20 | value(); 21 | 22 | private: 23 | // bloomValues returns the bytes (index-value pairs) to set for the given data 24 | std::tuple 25 | bloomValues(Slice const& data); 26 | 27 | private: 28 | uint2048 bloom_; 29 | }; 30 | 31 | bool 32 | bloomLookup(uint2048 const& bloom, Slice topic); 33 | } 34 | -------------------------------------------------------------------------------- /src/eth/evmc/test/tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | set(prefix ${PROJECT_NAME}/evmc-run) 6 | 7 | add_test( 8 | NAME ${prefix}/example1 9 | COMMAND evmc::tool run --vm $ 30600052596000f3 --gas 99 10 | ) 11 | set_tests_properties( 12 | ${prefix}/example1 PROPERTIES PASS_REGULAR_EXPRESSION 13 | "Result: +success[\r\n]+Gas used: +99[\r\n]+Output: +0000000000000000000000000000000000000000[\r\n]" 14 | ) 15 | 16 | get_property(tools_tests DIRECTORY PROPERTY TESTS) 17 | set_tests_properties(${tools_tests} PROPERTIES ENVIRONMENT LLVM_PROFILE_FILE=${CMAKE_BINARY_DIR}/tools-%p.profraw) 18 | -------------------------------------------------------------------------------- /.github/workflows/doxygen.yml: -------------------------------------------------------------------------------- 1 | name: Build and publish Doxygen documentation 2 | on: 3 | push: 4 | branches: 5 | - develop 6 | 7 | jobs: 8 | job: 9 | runs-on: ubuntu-18.04 10 | container: 11 | image: docker://rippleci/rippled-ci-builder:2944b78d22db 12 | steps: 13 | - name: checkout 14 | uses: actions/checkout@v2 15 | - name: build 16 | run: | 17 | mkdir build 18 | cd build 19 | cmake -DBoost_NO_BOOST_CMAKE=ON .. 20 | cmake --build . --target docs --parallel $(nproc) 21 | - name: publish 22 | uses: peaceiris/actions-gh-pages@v3 23 | with: 24 | github_token: ${{ secrets.GITHUB_TOKEN }} 25 | publish_dir: build/docs/html 26 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/control: -------------------------------------------------------------------------------- 1 | Source: rippled 2 | Section: misc 3 | Priority: extra 4 | Maintainer: Ripple Labs Inc. 5 | Build-Depends: cmake, debhelper (>=9), zlib1g-dev, dh-systemd, ninja-build 6 | Standards-Version: 3.9.7 7 | Homepage: http://ripple.com/ 8 | 9 | Package: rippled 10 | Architecture: any 11 | Multi-Arch: foreign 12 | Depends: ${misc:Depends}, ${shlibs:Depends} 13 | Description: rippled daemon 14 | 15 | Package: rippled-dev 16 | Section: devel 17 | Recommends: rippled (= ${binary:Version}) 18 | Architecture: any 19 | Multi-Arch: same 20 | Depends: ${misc:Depends}, ${shlibs:Depends}, libprotobuf-dev, libssl-dev 21 | Description: development files for applications using xrpl core library (serialize + sign) 22 | -------------------------------------------------------------------------------- /docs/CheatSheet.md: -------------------------------------------------------------------------------- 1 | # Form 2 | 3 | - One class per header file. 4 | - Place each data member on its own line. 5 | - Place each ctor-initializer on its own line. 6 | - Create typedefs for primitive types to describe them. 7 | - Return descriptive local variables instead of constants. 8 | - Use long descriptive names instead of abbreviations. 9 | - Use "explicit" for single-argument ctors 10 | - Avoid globals especially objects with static storage duration 11 | - Order class declarations as types, public, protected, private, then data. 12 | - Prefer 'private' over 'protected' 13 | 14 | # Function 15 | 16 | - Minimize external dependencies 17 | * Pass options in the ctor instead of using theConfig 18 | * Use as few other classes as possible 19 | -------------------------------------------------------------------------------- /src/eth/tools/FixedHash.cpp: -------------------------------------------------------------------------------- 1 | // Aleth: Ethereum C++ client, tools and libraries. 2 | // Copyright 2014-2019 Aleth Authors. 3 | // Licensed under the GNU General Public License, Version 3. 4 | #include "FixedHash.h" 5 | #include 6 | 7 | namespace eth 8 | { 9 | 10 | std::random_device s_fixedHashEngine; 11 | 12 | h128 fromUUID(std::string const& _uuid) 13 | { 14 | try 15 | { 16 | return h128(boost::replace_all_copy(_uuid, "-", "")); 17 | } 18 | catch (...) 19 | { 20 | return h128(); 21 | } 22 | } 23 | 24 | std::string toUUID(h128 const& _uuid) 25 | { 26 | std::string ret = toHex(_uuid.ref()); 27 | for (unsigned i: {20, 16, 12, 8}) 28 | ret.insert(ret.begin() + i, '-'); 29 | return ret; 30 | } 31 | 32 | } 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/peersafe/unity/app_table.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include -------------------------------------------------------------------------------- /src/wasmvm/example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | find_package( 4 | Boost 5 | 1.70.0 6 | ) 7 | 8 | if (Boost_FOUND) 9 | add_executable( 10 | chainsqlWasm 11 | main.cc 12 | ${CMAKE_SOURCE_DIR}/src/wasmvm/vm/impl/action.cc 13 | ${CMAKE_SOURCE_DIR}/src/wasmvm/vm/impl/chainsqlWasmVm.cc 14 | ) 15 | include_directories( 16 | ${CMAKE_SOURCE_DIR}/src/ 17 | ${CMAKE_SOURCE_DIR}/src/wasmvm/wasm3/source 18 | ${CMAKE_SOURCE_DIR}/src/wasmvm/wasm3/platforms/cpp/wasm3_cpp/include 19 | ${Boost_INCLUDE_DIRS} 20 | ) 21 | 22 | target_link_libraries(chainsqlWasm PRIVATE wasm3_cpp m3) 23 | target_compile_features(chainsqlWasm PRIVATE cxx_std_17) 24 | endif() 25 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/fib.c: -------------------------------------------------------------------------------- 1 | /* 2 | * emcc -g0 -O3 -s SIDE_MODULE=1 -s STRICT=1 -s WASM=1 -s ONLY_MY_CODE=1 -o fib.c.wasm fib.c 3 | * gcc -g0 -O3 fib.c -o fib.c.elf 4 | */ 5 | 6 | #include 7 | #define WASM_EXPORT __attribute__((used)) __attribute__((visibility ("default"))) 8 | 9 | WASM_EXPORT 10 | uint32_t fib(uint32_t n) 11 | { 12 | if(n < 2) { 13 | return n; 14 | } 15 | return fib(n-1) + fib(n-2); 16 | } 17 | 18 | int parseInt(char* str) { 19 | int res = 0; 20 | for (int i = 0; str[i] != '\0'; ++i) { 21 | res = res * 10 + str[i] - '0'; 22 | } 23 | return res; 24 | } 25 | 26 | WASM_EXPORT 27 | int main(int args, char* argv[]) { 28 | uint32_t n = parseInt(argv[1]); 29 | return fib(n); 30 | } 31 | -------------------------------------------------------------------------------- /src/eth/evmc/test/compilation/compilation_test.cxx: -------------------------------------------------------------------------------- 1 | /* EVMC: Ethereum Client-VM Connector API. 2 | * Copyright 2018-2019 The EVMC Authors. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | 6 | // Test compilation of C and C++ public headers. 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | // Include again to check if headers have proper include guards. 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/wm_w600/README.md: -------------------------------------------------------------------------------- 1 | ## Build for Winner Micro W600 2 | 3 | You will need: 4 | 5 | - [W600 SDK from ThingsTurn](https://github.com/w600/sdk) 6 | `git clone --depth=1 --branch=sdk_v3.2.0 https://github.com/w600/sdk.git /opt/w600-sdk` 7 | - [gcc-arm-none-eabi-4_9-2015q3](https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update) 8 | - [w600tool](https://github.com/vshymanskyy/w600tool) 9 | 10 | ```sh 11 | export PATH=/opt/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH 12 | 13 | export PATH=/opt/w600tool:$PATH 14 | 15 | export WM_SDK=/opt/w600-sdk 16 | 17 | ./build.sh 18 | ``` 19 | 20 | To upload: 21 | 22 | ```sh 23 | w600tool.py --upload .output/wasm3_gz.img 24 | ``` 25 | or 26 | ```sh 27 | w600tool.py --upload .output/wasm3.fls 28 | ``` 29 | -------------------------------------------------------------------------------- /src/peersafe/app/bloom/FilterHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | namespace ripple { 14 | namespace Helper { 15 | 16 | std::tuple 17 | getLogsByLedger(Schema& schame, const Ledger* ledger); 18 | 19 | Json::Value 20 | filterLogs(const Json::Value& unfilteredLogs, 21 | const std::uint32_t from, 22 | const std::uint32_t to, 23 | const std::vector& addresses, 24 | const std::vector>& topics); 25 | 26 | } // namespace Helper 27 | } // namespace ripple 28 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/gfan/dev/sdk_current/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /src/eth/evmc/CheatSheet.md: -------------------------------------------------------------------------------- 1 | # Code Style Cheat Sheet 2 | 3 | ## Form 4 | 5 | - One class per header file. 6 | - Place each data member on its own line. 7 | - Place each ctor-initializer on its own line. 8 | - Create typedefs for primitive types to describe them. 9 | - Return descriptive local variables instead of constants. 10 | - Use long descriptive names instead of abbreviations. 11 | - Use "explicit" for single-argument ctors 12 | - Avoid globals especially objects with static storage duration 13 | - Order class declarations as types, public, protected, private, then data. 14 | - Prefer 'private' over 'protected' 15 | 16 | ## Function 17 | 18 | - Minimize external dependencies 19 | * Pass options in the ctor instead of using theConfig 20 | * Use as few other classes as possible 21 | -------------------------------------------------------------------------------- /src/secp256k1/src/num_impl.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * Copyright (c) 2013, 2014 Pieter Wuille * 3 | * Distributed under the MIT software license, see the accompanying * 4 | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* 5 | **********************************************************************/ 6 | 7 | #ifndef _SECP256K1_NUM_IMPL_H_ 8 | #define _SECP256K1_NUM_IMPL_H_ 9 | 10 | #if defined HAVE_CONFIG_H 11 | #include "libsecp256k1-config.h" 12 | #endif 13 | 14 | #include "num.h" 15 | 16 | #if defined(USE_NUM_GMP) 17 | #include "num_gmp_impl.h" 18 | #elif defined(USE_NUM_NONE) 19 | /* Nothing. */ 20 | #else 21 | #error "Please select num implementation" 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/secp256k1/src/scalar_8x32.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * Copyright (c) 2014 Pieter Wuille * 3 | * Distributed under the MIT software license, see the accompanying * 4 | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* 5 | **********************************************************************/ 6 | 7 | #ifndef _SECP256K1_SCALAR_REPR_ 8 | #define _SECP256K1_SCALAR_REPR_ 9 | 10 | #include 11 | 12 | /** A scalar modulo the group order of the secp256k1 curve. */ 13 | typedef struct { 14 | uint32_t d[8]; 15 | } secp256k1_scalar; 16 | 17 | #define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{(d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)}} 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/eth/evmc/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2016-2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | include(GNUInstallDirs) 6 | 7 | add_subdirectory(example_vm) 8 | add_subdirectory(example_precompiles_vm) 9 | 10 | add_library(evmc-example-host STATIC example_host.cpp) 11 | target_link_libraries(evmc-example-host PRIVATE evmc::evmc_cpp) 12 | 13 | add_executable(evmc-example-static example.c) 14 | target_link_libraries(evmc-example-static PRIVATE evmc-example-host evmc::example-vm-static evmc::evmc) 15 | target_compile_definitions(evmc-example-static PRIVATE STATICALLY_LINKED_EXAMPLE) 16 | 17 | add_executable(evmc-example example.c) 18 | target_link_libraries(evmc-example PRIVATE evmc-example-host evmc::loader) 19 | -------------------------------------------------------------------------------- /src/eth/evmc/lib/instructions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2018-2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | add_library( 6 | instructions STATIC 7 | ${include_dir}/evmc/instructions.h 8 | instruction_metrics.c 9 | instruction_names.c 10 | ) 11 | 12 | add_library(evmc::instructions ALIAS instructions) 13 | set_target_properties(instructions PROPERTIES 14 | OUTPUT_NAME evmc-instructions 15 | POSITION_INDEPENDENT_CODE TRUE 16 | ) 17 | target_include_directories(instructions PUBLIC 18 | $$ 19 | ) 20 | 21 | if(EVMC_INSTALL) 22 | install(TARGETS instructions EXPORT evmcTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}) 23 | endif() 24 | -------------------------------------------------------------------------------- /src/intx/test/unittests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # intx: extended precision integer library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | include(GoogleTest) 6 | 7 | hunter_add_package(GTest) 8 | find_package(GTest CONFIG REQUIRED) 9 | 10 | add_executable(intx-unittests 11 | test_builtins.cpp 12 | test_cases.hpp 13 | test_div.cpp 14 | test_int128.cpp 15 | test_intx.cpp 16 | test_intx_api.cpp 17 | ) 18 | target_link_libraries(intx-unittests PRIVATE intx intx::experimental GTest::gtest GTest::main) 19 | target_include_directories(intx-unittests PRIVATE ${intx_internal_include_dir}) 20 | set_target_properties(intx-unittests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..) 21 | 22 | gtest_add_tests(TARGET intx-unittests TEST_PREFIX ${PROJECT_NAME}/unittests/) -------------------------------------------------------------------------------- /src/intx/cmake/Hunter/init.cmake: -------------------------------------------------------------------------------- 1 | # intx: extended precision integer library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | # Figure out if Hunter is needed. 6 | if(INTX_TESTING OR INTX_BENCHMARKING) 7 | set(hunter_enabled TRUE) 8 | else() 9 | set(hunter_enabled FALSE) 10 | endif() 11 | 12 | option(HUNTER_ENABLED "Enable Hunter package manager" ${hunter_enabled}) 13 | 14 | set(HUNTER_CONFIGURATION_TYPES Release 15 | CACHE STRING "Build type of the Hunter packages") 16 | set(HUNTER_CACHE_SERVERS 17 | "https://github.com/ethereum/hunter-cache" 18 | CACHE STRING "Hunter cache servers") 19 | 20 | include(HunterGate) 21 | 22 | HunterGate( 23 | URL "https://github.com/ruslo/hunter/archive/v0.23.151.tar.gz" 24 | SHA1 "68657b81508c2d3c248731b5a0c2125f19866721" 25 | ) 26 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/buildinfo/buildinfo.h.in: -------------------------------------------------------------------------------- 1 | /* Cable: CMake Bootstrap Library. 2 | * Copyright 2018 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | */ 5 | 6 | /* Generated by Cable Build Info on @TIMESTAMP@. Do not modify directly. */ 7 | 8 | #pragma once 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | struct buildinfo 16 | { 17 | const char* project_name; 18 | const char* project_version; 19 | const char* project_name_with_version; 20 | const char* git_commit_hash; 21 | const char* system_name; 22 | const char* system_processor; 23 | const char* compiler_id; 24 | const char* compiler_version; 25 | const char* build_type; 26 | }; 27 | 28 | const struct buildinfo* @FUNCTION_NAME@(); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/buildinfo/buildinfo.h.in: -------------------------------------------------------------------------------- 1 | /* Cable: CMake Bootstrap Library. 2 | * Copyright 2018 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | */ 5 | 6 | /* Generated by Cable Build Info on @TIMESTAMP@. Do not modify directly. */ 7 | 8 | #pragma once 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | struct buildinfo 16 | { 17 | const char* project_name; 18 | const char* project_version; 19 | const char* project_name_with_version; 20 | const char* git_commit_hash; 21 | const char* system_name; 22 | const char* system_processor; 23 | const char* compiler_id; 24 | const char* compiler_version; 25 | const char* build_type; 26 | }; 27 | 28 | const struct buildinfo* @FUNCTION_NAME@(); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /src/intx/cmake/FindGMP.cmake: -------------------------------------------------------------------------------- 1 | # intx: extended precision integer library. 2 | # Copyright 2019 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | find_path(GMP_INCLUDE_DIR NAMES gmp.h) 6 | 7 | # Find the library file, prefer static over dynamic. 8 | find_library(GMP_LIBRARY NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}gmp${CMAKE_STATIC_LIBRARY_SUFFIX} gmp) 9 | 10 | include(FindPackageHandleStandardArgs) 11 | find_package_handle_standard_args(GMP DEFAULT_MSG GMP_LIBRARY GMP_INCLUDE_DIR) 12 | mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARY) 13 | 14 | add_library(GMP::gmp IMPORTED SHARED) 15 | set_property(TARGET GMP::gmp PROPERTY IMPORTED_CONFIGURATIONS Release) 16 | set_property(TARGET GMP::gmp PROPERTY IMPORTED_LOCATION_RELEASE ${GMP_LIBRARY}) 17 | set_property(TARGET GMP::gmp PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GMP_INCLUDE_DIR}) 18 | -------------------------------------------------------------------------------- /src/intx/test/experimental/div.hpp: -------------------------------------------------------------------------------- 1 | // intx: extended precision integer library. 2 | // Copyright 2019 Pawel Bylica. 3 | // Licensed under the Apache License, Version 2.0. 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace intx 10 | { 11 | div_result udiv_qr_knuth_hd_base(const uint256& x, const uint256& y); 12 | div_result udiv_qr_knuth_llvm_base(const uint256& u, const uint256& v); 13 | div_result udiv_qr_knuth_opt_base(const uint256& x, const uint256& y); 14 | div_result udiv_qr_knuth_opt(const uint256& x, const uint256& y); 15 | div_result udiv_qr_knuth_64(const uint256& x, const uint256& y); 16 | div_result udiv_qr_knuth_512(const uint512& x, const uint512& y); 17 | div_result udiv_qr_knuth_512_64(const uint512& x, const uint512& y); 18 | } // namespace intx 19 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp8266/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [env:esp8266] 12 | platform = espressif8266 13 | board = nodemcuv2 14 | framework = arduino 15 | monitor_speed = 115200 16 | upload_speed = 460800 17 | 18 | board_build.f_cpu = 160000000L 19 | 20 | src_filter = 21 | +<*> 22 | - 23 | 24 | src_build_flags = 25 | -Dd_m3FixedHeap=8192 26 | -O3 -Wfatal-errors 27 | -flto 28 | #-fPIC -fverbose-asm -save-temps=obj 29 | 30 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/EVMC.cmake: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | 6 | # Adds a CMake test to check the given EVMC VM implementation with the evmc-vmtester tool. 7 | # 8 | # evmc_add_vm_test(NAME TARGET ) 9 | # - NAME argument specifies the name of the added test, 10 | # - TARGET argument specifies the CMake target being a shared library with EVMC VM implementation. 11 | function(evmc_add_vm_test) 12 | if(NOT TARGET evmc::evmc-vmtester) 13 | message(FATAL_ERROR "The evmc-vmtester has not been installed with this EVMC package") 14 | endif() 15 | 16 | cmake_parse_arguments("" "" NAME;TARGET "" ${ARGN}) 17 | add_test(NAME ${_NAME} COMMAND $ $) 18 | endfunction() 19 | -------------------------------------------------------------------------------- /src/peersafe/crypto/impl/sha3.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // sha3.cpp 3 | // chainsqld 4 | // 5 | // Created by lascion on 2022/9/15. 6 | // 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | namespace ripple { 13 | 14 | #ifndef OLD_SHA3 15 | Sha3::Sha3() 16 | { 17 | eth::sha3_Init256(&sha3Ctx); 18 | eth::sha3_SetFlags(&sha3Ctx, eth::SHA3_FLAGS_KECCAK); 19 | } 20 | 21 | Sha3::~Sha3() 22 | {} 23 | 24 | void Sha3::operator()(void const* data, std::size_t size) noexcept 25 | { 26 | eth::sha3_Update(&sha3Ctx, data, size); 27 | } 28 | 29 | Sha3::operator result_type() noexcept 30 | { 31 | const uint8_t* h = (const uint8_t*)eth::sha3_Finalize(&sha3Ctx); 32 | 33 | Sha3::result_type result; 34 | std::copy(h, h + 32, result.begin()); 35 | return result; 36 | } 37 | #endif 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/secp256k1/src/scalar_4x64.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * Copyright (c) 2014 Pieter Wuille * 3 | * Distributed under the MIT software license, see the accompanying * 4 | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* 5 | **********************************************************************/ 6 | 7 | #ifndef _SECP256K1_SCALAR_REPR_ 8 | #define _SECP256K1_SCALAR_REPR_ 9 | 10 | #include 11 | 12 | /** A scalar modulo the group order of the secp256k1 curve. */ 13 | typedef struct { 14 | uint64_t d[4]; 15 | } secp256k1_scalar; 16 | 17 | #define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{((uint64_t)(d1)) << 32 | (d0), ((uint64_t)(d3)) << 32 | (d2), ((uint64_t)(d5)) << 32 | (d4), ((uint64_t)(d7)) << 32 | (d6)}} 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/emscripten_lib/run_native.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (typeof(process) != 'undefined') { // Node.js environment? 4 | var scriptArgs = process.argv.slice(2); 5 | const fs = require('fs'); 6 | var readFile = (fn) => new Uint8Array(fs.readFileSync(fn)); 7 | } else { 8 | var readFile = (fn) => read(fn, 'binary'); 9 | } 10 | 11 | let instances = []; 12 | 13 | (async() => { 14 | const wasm = scriptArgs[0]; 15 | const func = scriptArgs[1]; 16 | const args = scriptArgs.slice(2); 17 | 18 | const binary = readFile(wasm); 19 | 20 | for (let i=0; i<1000; i++) { // V8: 1028 max, SpiderMonkey: 32650 max 21 | let instance = (await WebAssembly.instantiate(binary)).instance; 22 | 23 | instances[i] = instance; 24 | 25 | let result = instance.exports[func](...args); 26 | //console.log(i, result); 27 | } 28 | })(); 29 | -------------------------------------------------------------------------------- /src/beast/extras/beast/test/sig_wait.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | 8 | #ifndef BEAST_TEST_SIG_WAIT_HPP 9 | #define BEAST_TEST_SIG_WAIT_HPP 10 | 11 | #include 12 | 13 | namespace beast { 14 | namespace test { 15 | 16 | /// Block until SIGINT or SIGTERM is received. 17 | inline 18 | void 19 | sig_wait() 20 | { 21 | boost::asio::io_service ios; 22 | boost::asio::signal_set signals( 23 | ios, SIGINT, SIGTERM); 24 | signals.async_wait( 25 | [&](boost::system::error_code const&, int) 26 | { 27 | }); 28 | ios.run(); 29 | } 30 | 31 | } // test 32 | } // beast 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/eth/evmc/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2018-2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | add_library(evmc INTERFACE) 6 | add_library(evmc::evmc ALIAS evmc) 7 | target_include_directories(evmc INTERFACE $$) 8 | 9 | add_library(evmc_cpp INTERFACE) 10 | add_library(evmc::evmc_cpp ALIAS evmc_cpp) 11 | target_compile_features(evmc_cpp INTERFACE cxx_std_11) 12 | target_include_directories(evmc_cpp INTERFACE $$) 13 | target_link_libraries(evmc_cpp INTERFACE evmc::evmc) 14 | 15 | add_subdirectory(instructions) 16 | add_subdirectory(loader) 17 | add_subdirectory(mocked_host) 18 | 19 | if(EVMC_INSTALL) 20 | install(TARGETS evmc evmc_cpp EXPORT evmcTargets) 21 | endif() 22 | -------------------------------------------------------------------------------- /src/eth/evmc/tools/vmtester/vmtester.hpp: -------------------------------------------------------------------------------- 1 | // EVMC: Ethereum Client-VM Connector API 2 | // Copyright 2018-2019 The EVMC Authors. 3 | // Licensed under the Apache License, Version 2.0. 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | class evmc_vm_test : public ::testing::Test 10 | { 11 | public: 12 | static void set_vm(evmc::VM _owned_vm) noexcept { owned_vm = std::move(_owned_vm); } 13 | 14 | protected: 15 | /// The raw pointer to the loaded VM instance. 16 | /// The C API is used to allow more sophisticated unit tests. 17 | evmc_vm* vm = nullptr; 18 | 19 | /// The C++ RAII wrapper of the loaded VM instance. 20 | static evmc::VM owned_vm; 21 | 22 | evmc_vm_test() : vm{owned_vm.get_raw_pointer()} {} 23 | 24 | void SetUp() override { ASSERT_TRUE(vm != nullptr) << "VM instance not loaded"; } 25 | }; 26 | -------------------------------------------------------------------------------- /src/intx/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | image: Visual Studio 2017 3 | branches: 4 | only: 5 | - master 6 | - /release\/.*/ 7 | - appveyor 8 | - hunter 9 | configuration: 10 | - Release 11 | environment: 12 | matrix: 13 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 14 | GENERATOR: "Ninja" 15 | 16 | cache: 17 | - C:\.hunter\_Base\Cache -> cmake\Hunter\init.cmake 18 | 19 | install: 20 | - cmake --version 21 | 22 | before_build: 23 | - call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=amd64 24 | - cmake -S . -B build -DINTX_BENCHMARKING=OFF -DNATIVE=ON -Wno-dev -G "%GENERATOR%" -DCMAKE_INSTALL_PREFIX=C:\install 25 | 26 | build_script: 27 | - cmake --build build --target install 28 | - cmake --build build --target package 29 | 30 | after_build: 31 | - cd build && ctest -j4 --output-on-failure --schedule-random 32 | -------------------------------------------------------------------------------- /Builds/CMake/README.md: -------------------------------------------------------------------------------- 1 | 2 | These are modules and sources that support our CMake build. 3 | 4 | == FindBoost.cmake == 5 | 6 | In order to facilitate updating to latest releases of boost, we've made a local 7 | copy of the FindBoost cmake module in our repo. The latest official version can 8 | generally be obtained 9 | [here](https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake). 10 | 11 | The latest version provided by Kitware can be tailored for use with the 12 | version of CMake that it ships with (typically the next upcoming CMake 13 | release). As such, the latest version from the repository might not work 14 | perfectly with older versions of CMake - for instance, the latest version 15 | might use features or properties only available in the version of CMake that 16 | it ships with. Given this, it's best to test any updates to this module with a few 17 | different versions of cmake. 18 | 19 | -------------------------------------------------------------------------------- /src/eth/evmc/include/evmc/utils.h: -------------------------------------------------------------------------------- 1 | /* EVMC: Ethereum Client-VM Connector API. 2 | * Copyright 2018-2019 The EVMC Authors. 3 | * Licensed under the Apache License, Version 2.0. 4 | */ 5 | 6 | #pragma once 7 | 8 | /** 9 | * @file 10 | * A collection of helper macros to handle some non-portable features of C/C++ compilers. 11 | * 12 | * @addtogroup helpers 13 | * @{ 14 | */ 15 | 16 | /** 17 | * @def EVMC_EXPORT 18 | * Marks a function to be exported from a shared library. 19 | */ 20 | #if defined _MSC_VER || defined __MINGW32__ 21 | #define EVMC_EXPORT __declspec(dllexport) 22 | #else 23 | #define EVMC_EXPORT __attribute__((visibility("default"))) 24 | #endif 25 | 26 | /** 27 | * @def EVMC_NOEXCEPT 28 | * Safe way of marking a function with `noexcept` C++ specifier. 29 | */ 30 | #if __cplusplus 31 | #define EVMC_NOEXCEPT noexcept 32 | #else 33 | #define EVMC_NOEXCEPT 34 | #endif 35 | 36 | /** @} */ 37 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | 19 | android.enableJetifier=true 20 | android.useAndroidX=true 21 | 22 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/source/m3_api_wasi.h: -------------------------------------------------------------------------------- 1 | // 2 | // m3_api_wasi.h 3 | // 4 | // Created by Volodymyr Shymanskyy on 11/20/19. 5 | // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. 6 | // 7 | 8 | #ifndef m3_api_wasi_h 9 | #define m3_api_wasi_h 10 | 11 | #include "m3_core.h" 12 | 13 | #if defined(d_m3HasUVWASI) 14 | #include "uvwasi.h" 15 | #endif 16 | 17 | d_m3BeginExternC 18 | 19 | typedef struct m3_wasi_context_t 20 | { 21 | i32 exit_code; 22 | u32 argc; 23 | ccstr_t * argv; 24 | } m3_wasi_context_t; 25 | 26 | M3Result m3_LinkWASI (IM3Module io_module); 27 | 28 | #if defined(d_m3HasUVWASI) 29 | 30 | M3Result m3_LinkWASIWithOptions (IM3Module io_module, uvwasi_options_t uvwasiOptions); 31 | 32 | #endif 33 | 34 | m3_wasi_context_t* m3_GetWasiContext(); 35 | 36 | d_m3EndExternC 37 | 38 | #endif // m3_api_wasi_h 39 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.9) 2 | project(wasm3_cpp_example) 3 | 4 | set(target ${CMAKE_PROJECT_NAME}) 5 | 6 | add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../../source ${CMAKE_BINARY_DIR}/m3) 7 | 8 | add_executable(${target} main.cpp) 9 | target_link_libraries(${target} PRIVATE m3) 10 | 11 | add_subdirectory(wasm3_cpp) 12 | target_link_libraries(${target} PRIVATE wasm3_cpp) 13 | 14 | target_compile_options(${target} PUBLIC -g) 15 | target_compile_options(m3 PUBLIC -g) 16 | 17 | # Copy the 'wasm' directory into the build directory, so that 18 | # wasm/test_prog.wasm is found even if wasm3_cpp_example is executed 19 | # from the build directory. 20 | add_custom_target(copy_wasm ALL 21 | COMMAND ${CMAKE_COMMAND} -E copy_directory 22 | ${CMAKE_CURRENT_LIST_DIR}/wasm 23 | ${CMAKE_BINARY_DIR}/wasm 24 | ) 25 | add_dependencies(${CMAKE_PROJECT_NAME} copy_wasm) 26 | -------------------------------------------------------------------------------- /Builds/containers/gitlab-ci/build_package.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -ex 3 | pkgtype=$1 4 | if [ "${pkgtype}" = "rpm" ] ; then 5 | container_name="${RPM_CONTAINER_FULLNAME}" 6 | container_tag="${RPM_CONTAINER_TAG}" 7 | elif [ "${pkgtype}" = "dpkg" ] ; then 8 | container_name="${DPKG_CONTAINER_FULLNAME}" 9 | container_tag="${DPKG_CONTAINER_TAG}" 10 | else 11 | echo "invalid package type" 12 | exit 1 13 | fi 14 | time docker pull "${ARTIFACTORY_HUB}/${container_name}" 15 | docker tag \ 16 | "${ARTIFACTORY_HUB}/${container_name}" \ 17 | "${container_name}" 18 | docker images 19 | test -d build && rm -rf build 20 | mkdir -p build/${pkgtype} && cd build/${pkgtype} 21 | time cmake \ 22 | -Dpackages_only=ON \ 23 | -Dcontainer_label="${container_tag}" \ 24 | -Dhave_package_container=ON \ 25 | -DCMAKE_VERBOSE_MAKEFILE=ON \ 26 | -G Ninja ../.. 27 | time cmake --build . --target ${pkgtype} -- -v 28 | 29 | -------------------------------------------------------------------------------- /src/wasmvm/vm/action.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace chainsql { 7 | 8 | class action { 9 | private: 10 | name code_; 11 | name function_; 12 | std::string payload_; 13 | public: 14 | action( 15 | const name &code, 16 | const name &func, 17 | const std::string &payload) 18 | : code_(code), function_(func), payload_(payload) 19 | { 20 | } 21 | 22 | ~action() 23 | { 24 | } 25 | 26 | const name& code() const 27 | { 28 | return code_; 29 | } 30 | 31 | const name& function() const 32 | { 33 | return function_; 34 | } 35 | 36 | const std::string& payload() const 37 | { 38 | return payload_; 39 | } 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/hifive1/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [platformio] 12 | default_envs = hifive1-revb 13 | 14 | [env] 15 | platform = sifive 16 | framework = freedom-e-sdk 17 | monitor_speed = 115200 18 | 19 | board_build.f_cpu = 320000000L 20 | 21 | src_filter = 22 | +<*> 23 | - 24 | 25 | src_build_flags = 26 | -Dd_m3FixedHeap=8192 27 | -Os -Wfatal-errors 28 | -flto 29 | 30 | build_flags = -lm 31 | 32 | [env:hifive1] 33 | board = hifive1 34 | 35 | [env:hifive1-revb] 36 | board = hifive1-revb 37 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/emscripten/README.md: -------------------------------------------------------------------------------- 1 | ## Build using Emscripten 2 | 3 | In root: 4 | 5 | ```sh 6 | source /opt/emsdk/emsdk_env.sh --build=Release 7 | mkdir -p build 8 | cd build 9 | cmake -GNinja -DEMSCRIPTEN=1 .. 10 | ninja 11 | ``` 12 | 13 | **Note:** 14 | 15 | To enable WebAssembly extensions: 16 | ```sh 17 | cmake -GNinja -DEMSCRIPTEN=1 -DWASM_EXT=1 .. 18 | ``` 19 | 20 | You can convert the generated wasm to wat to see the effect: 21 | ```sh 22 | wasm2wat --enable-tail-call --enable-bulk-memory wasm3.wasm > wasm3.wat 23 | ``` 24 | 25 | Running `tail-call` version will require Chrome with experimental flags: 26 | ```sh 27 | emrun --no_browser --no_emrun_detect --port 8080 . 28 | chrome --js-flags="--experimental-wasm-return-call --wasm-opt" --no-sandbox http://localhost:8080/wasm3.html 29 | ``` 30 | 31 | Or use Node.js: 32 | ```sh 33 | node --experimental-wasm-return-call --wasm-opt ./wasm3.js 34 | ``` 35 | 36 | -------------------------------------------------------------------------------- /src/eth/evmc/examples/example_vm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # EVMC: Ethereum Client-VM Connector API. 2 | # Copyright 2019 The EVMC Authors. 3 | # Licensed under the Apache License, Version 2.0. 4 | 5 | add_library(example-vm SHARED example_vm.c example_vm.h) 6 | add_library(evmc::example-vm ALIAS example-vm) 7 | target_link_libraries(example-vm PRIVATE evmc::evmc) 8 | 9 | add_library(example-vm-static STATIC example_vm.c example_vm.h) 10 | add_library(evmc::example-vm-static ALIAS example-vm-static) 11 | target_link_libraries(example-vm-static PRIVATE evmc::evmc) 12 | 13 | set_source_files_properties(example_vm.cpp PROPERTIES 14 | COMPILE_DEFINITIONS PROJECT_VERSION="${PROJECT_VERSION}") 15 | 16 | if(EVMC_INSTALL) 17 | install(TARGETS example-vm 18 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 19 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 20 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 21 | ) 22 | endif() 23 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/buildinfo/buildinfo.c.in: -------------------------------------------------------------------------------- 1 | /* Cable: CMake Bootstrap Library. 2 | * Copyright 2018 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | */ 5 | 6 | /* Generated by Cable Build Info on @TIMESTAMP@. Do not modify directly. */ 7 | 8 | #include "buildinfo.h" 9 | 10 | const struct buildinfo* @FUNCTION_NAME@() 11 | { 12 | static const struct buildinfo buildinfo = { 13 | .project_name = "@PROJECT_NAME@", 14 | .project_version = "@PROJECT_VERSION@", 15 | .project_name_with_version = "@PROJECT_NAME@-@PROJECT_VERSION@", 16 | .git_commit_hash = "@GIT_COMMIT_HASH@", 17 | .system_name = "@SYSTEM_NAME@", 18 | .system_processor = "@SYSTEM_PROCESSOR@", 19 | .compiler_id = "@COMPILER_ID@", 20 | .compiler_version = "@COMPILER_VERSION@", 21 | .build_type = "@BUILD_TYPE@", 22 | }; 23 | return &buildinfo; 24 | } 25 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/buildinfo/buildinfo.c.in: -------------------------------------------------------------------------------- 1 | /* Cable: CMake Bootstrap Library. 2 | * Copyright 2018 Pawel Bylica. 3 | * Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | */ 5 | 6 | /* Generated by Cable Build Info on @TIMESTAMP@. Do not modify directly. */ 7 | 8 | #include "buildinfo.h" 9 | 10 | const struct buildinfo* @FUNCTION_NAME@() 11 | { 12 | static const struct buildinfo buildinfo = { 13 | .project_name = "@PROJECT_NAME@", 14 | .project_version = "@PROJECT_VERSION@", 15 | .project_name_with_version = "@PROJECT_NAME@-@PROJECT_VERSION@", 16 | .git_commit_hash = "@GIT_COMMIT_HASH@", 17 | .system_name = "@SYSTEM_NAME@", 18 | .system_processor = "@SYSTEM_PROCESSOR@", 19 | .compiler_id = "@COMPILER_ID@", 20 | .compiler_version = "@COMPILER_VERSION@", 21 | .build_type = "@BUILD_TYPE@", 22 | }; 23 | return &buildinfo; 24 | } 25 | -------------------------------------------------------------------------------- /src/secp256k1/.gitignore: -------------------------------------------------------------------------------- 1 | bench_inv 2 | bench_ecdh 3 | bench_sign 4 | bench_verify 5 | bench_schnorr_verify 6 | bench_recover 7 | bench_internal 8 | tests 9 | exhaustive_tests 10 | gen_context 11 | *.exe 12 | *.so 13 | *.a 14 | !.gitignore 15 | 16 | Makefile 17 | configure 18 | .libs/ 19 | Makefile.in 20 | aclocal.m4 21 | autom4te.cache/ 22 | config.log 23 | config.status 24 | *.tar.gz 25 | *.la 26 | libtool 27 | .deps/ 28 | .dirstamp 29 | *.lo 30 | *.o 31 | *~ 32 | src/libsecp256k1-config.h 33 | src/libsecp256k1-config.h.in 34 | src/ecmult_static_context.h 35 | build-aux/config.guess 36 | build-aux/config.sub 37 | build-aux/depcomp 38 | build-aux/install-sh 39 | build-aux/ltmain.sh 40 | build-aux/m4/libtool.m4 41 | build-aux/m4/lt~obsolete.m4 42 | build-aux/m4/ltoptions.m4 43 | build-aux/m4/ltsugar.m4 44 | build-aux/m4/ltversion.m4 45 | build-aux/missing 46 | build-aux/compile 47 | build-aux/test-driver 48 | src/stamp-h1 49 | libsecp256k1.pc 50 | -------------------------------------------------------------------------------- /src/ripple/proto/org/zxcl/rpc/v1/ledger.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package org.zxcl.rpc.v1; 4 | option java_package = "org.zxcl.rpc.v1"; 5 | option java_multiple_files = true; 6 | 7 | // Next field: 4 8 | message LedgerSpecifier 9 | { 10 | // Next field: 4 11 | enum Shortcut 12 | { 13 | SHORTCUT_UNSPECIFIED = 0; 14 | SHORTCUT_VALIDATED = 1; 15 | SHORTCUT_CLOSED = 2; 16 | SHORTCUT_CURRENT = 3; 17 | } 18 | 19 | oneof ledger 20 | { 21 | Shortcut shortcut = 1; 22 | uint32 sequence = 2; 23 | // 32 bytes 24 | bytes hash = 3; 25 | } 26 | } 27 | 28 | // Next field: 3 29 | message LedgerRange 30 | { 31 | uint32 ledger_index_min = 1; 32 | 33 | // Note, if ledger_index_min is non-zero and ledger_index_max is 0, the 34 | // software will use the max validated ledger in place of ledger_index_max 35 | uint32 ledger_index_max = 2; 36 | }; 37 | 38 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/docs/Installation.md: -------------------------------------------------------------------------------- 1 | # Wasm3 installation 2 | 3 | ## Windows 4 | Download `wasm3-win-x64.exe` or `wasm3-win-x86.exe` from the [latest release page](https://github.com/wasm3/wasm3/releases/latest). 5 | 6 | ## macOS 7 | Use [Homebrew](https://brew.sh) to build and install automatically: 8 | ```sh 9 | brew install wasm3 10 | ``` 11 | 12 | ## Cosmopolitan / Actually Portable Executable 13 | [APE](https://justine.lol/cosmopolitan/index.html) is a polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS. 14 | Download `wasm3-cosmopolitan.com` from the [latest release page](https://github.com/wasm3/wasm3/releases/latest) 15 | 16 | ## OpenWRT 17 | Follow instructions [here](https://github.com/wasm3/wasm3-openwrt-packages). 18 | 19 | ## Arduino / PlatformIO / Particle.io library 20 | Find `Wasm3` in the `Library Manager` and install it. 21 | 22 | ## Python module 23 | ```sh 24 | pip3 install pywasm3 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /src/wasmvm/vm/tests/testAction.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | int main(int argc, char **argv) { 9 | std::tuple args = std::make_tuple(100,200); 10 | std::string payload; 11 | payload.resize(2*sizeof(int)); 12 | chainsql::datastream ds = chainsql::datastream(payload.data(), payload.size()); 13 | chainsql::action action(chainsql::name("math"), chainsql::name("add"), payload); 14 | 15 | // initialize a vm 16 | chainsql::chainsqlWasmVm vm(1024); 17 | // load wasm code and return a module 18 | wasm3::module mod = vm.loadWasm(math_wasm, math_wasm_len); 19 | 20 | // load import functions for module 21 | chainsql::importGlobalFunctions global; 22 | global.load(mod); 23 | 24 | int ret = vm.apply(chainsql::actionCallBack(action), mod); 25 | return 0; 26 | } -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/cpp/wasm/test_prog.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern int sum(int, int); 5 | extern int ext_memcpy(void*, const void*, size_t); 6 | 7 | int32_t counter = 0; 8 | 9 | #define WASM_EXPORT __attribute__((used)) __attribute__((visibility ("default"))) 10 | 11 | int WASM_EXPORT test(int32_t arg1, int32_t arg2) 12 | { 13 | int x = arg1 + arg2; 14 | int y = arg1 - arg2; 15 | return sum(x, y) / 2; 16 | } 17 | 18 | int64_t WASM_EXPORT test_memcpy(void) 19 | { 20 | int64_t x = 0; 21 | int32_t low = 0x01234567; 22 | int32_t high = 0x89abcdef; 23 | ext_memcpy(&x, &low, 4); 24 | ext_memcpy(((uint8_t*)&x) + 4, &high, 4); 25 | return x; 26 | } 27 | 28 | int32_t WASM_EXPORT test_counter_get() 29 | { 30 | return counter; 31 | } 32 | 33 | void WASM_EXPORT test_counter_inc() 34 | { 35 | ++counter; 36 | } 37 | 38 | void WASM_EXPORT test_counter_add(int32_t inc_value) 39 | { 40 | counter += inc_value; 41 | } 42 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/wasi/mal/env.mal: -------------------------------------------------------------------------------- 1 | (def! bind-env (fn* [env b e] 2 | (if (empty? b) 3 | env 4 | (let* [b0 (first b)] 5 | (if (= '& b0) 6 | (assoc env (str (nth b 1)) e) 7 | (bind-env (assoc env (str b0) (first e)) (rest b) (rest e))))))) 8 | 9 | (def! new-env (fn* [& args] 10 | (if (<= (count args) 1) 11 | (atom {:outer (first args)}) 12 | (atom (apply bind-env {:outer (first args)} (rest args)))))) 13 | 14 | (def! env-find (fn* [env k] 15 | (env-find-str env (str k)))) 16 | 17 | (def! env-find-str (fn* [env ks] 18 | (if env 19 | (let* [data @env] 20 | (if (contains? data ks) 21 | env 22 | (env-find-str (get data :outer) ks)))))) 23 | 24 | (def! env-get (fn* [env k] 25 | (let* [ks (str k) 26 | e (env-find-str env ks)] 27 | (if e 28 | (get @e ks) 29 | (throw (str "'" ks "' not found")))))) 30 | 31 | (def! env-set (fn* [env k v] 32 | (do 33 | (swap! env assoc (str k) v) 34 | v))) 35 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/mips64.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_SYSTEM_PROCESSOR mips64) 6 | set(CMAKE_SYSTEM_NAME Linux) 7 | set(CMAKE_C_COMPILER mips64-linux-gnuabi64-gcc) 8 | set(CMAKE_CXX_COMPILER mips64-linux-gnuabi64-g++) 9 | 10 | set(CMAKE_FIND_ROOT_PATH /usr/mips64-linux-gnuabi64) 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | 15 | set(CMAKE_CXX_STANDARD 11) 16 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 17 | set(CMAKE_CXX_EXTENSIONS Off) 18 | 19 | if(${CMAKE_VERSION} VERSION_LESS 3.10.0) 20 | # Until CMake 3.10 the FindThreads uses try_run() check of -pthread flag, 21 | # what causes CMake error in crosscompiling mode. Avoid the try_run() check 22 | # by specifying the result up front. 23 | set(THREADS_PTHREAD_ARG TRUE) 24 | endif() 25 | -------------------------------------------------------------------------------- /src/intx/cmake/cable/toolchains/powerpc64.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_SYSTEM_PROCESSOR powerpc64) 6 | set(CMAKE_SYSTEM_NAME Linux) 7 | set(CMAKE_C_COMPILER powerpc64-linux-gnu-gcc) 8 | set(CMAKE_CXX_COMPILER powerpc64-linux-gnu-g++) 9 | 10 | set(CMAKE_FIND_ROOT_PATH /usr/powerpc64-linux-gnu) 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | 15 | set(CMAKE_CXX_STANDARD 11) 16 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 17 | set(CMAKE_CXX_EXTENSIONS OFF) 18 | 19 | if(${CMAKE_VERSION} VERSION_LESS 3.10.0) 20 | # Until CMake 3.10 the FindThreads uses try_run() check of -pthread flag, 21 | # what causes CMake error in crosscompiling mode. Avoid the try_run() check 22 | # by specifying the result up front. 23 | set(THREADS_PTHREAD_ARG TRUE) 24 | endif() 25 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/mips64.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_SYSTEM_PROCESSOR mips64) 6 | set(CMAKE_SYSTEM_NAME Linux) 7 | set(CMAKE_C_COMPILER mips64-linux-gnuabi64-gcc) 8 | set(CMAKE_CXX_COMPILER mips64-linux-gnuabi64-g++) 9 | 10 | set(CMAKE_FIND_ROOT_PATH /usr/mips64-linux-gnuabi64) 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | 15 | set(CMAKE_CXX_STANDARD 11) 16 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 17 | set(CMAKE_CXX_EXTENSIONS Off) 18 | 19 | if(${CMAKE_VERSION} VERSION_LESS 3.10.0) 20 | # Until CMake 3.10 the FindThreads uses try_run() check of -pthread flag, 21 | # what causes CMake error in crosscompiling mode. Avoid the try_run() check 22 | # by specifying the result up front. 23 | set(THREADS_PTHREAD_ARG TRUE) 24 | endif() 25 | -------------------------------------------------------------------------------- /src/eth/evmc/cmake/cable/toolchains/powerpc64.cmake: -------------------------------------------------------------------------------- 1 | # Cable: CMake Bootstrap Library. 2 | # Copyright 2018 Pawel Bylica. 3 | # Licensed under the Apache License, Version 2.0. See the LICENSE file. 4 | 5 | set(CMAKE_SYSTEM_PROCESSOR powerpc64) 6 | set(CMAKE_SYSTEM_NAME Linux) 7 | set(CMAKE_C_COMPILER powerpc64-linux-gnu-gcc) 8 | set(CMAKE_CXX_COMPILER powerpc64-linux-gnu-g++) 9 | 10 | set(CMAKE_FIND_ROOT_PATH /usr/powerpc64-linux-gnu) 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | 15 | set(CMAKE_CXX_STANDARD 11) 16 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 17 | set(CMAKE_CXX_EXTENSIONS OFF) 18 | 19 | if(${CMAKE_VERSION} VERSION_LESS 3.10.0) 20 | # Until CMake 3.10 the FindThreads uses try_run() check of -pthread flag, 21 | # what causes CMake error in crosscompiling mode. Avoid the try_run() check 22 | # by specifying the result up front. 23 | set(THREADS_PTHREAD_ARG TRUE) 24 | endif() 25 | -------------------------------------------------------------------------------- /src/peersafe/app/tx/OperationRule.h: -------------------------------------------------------------------------------- 1 | #ifndef RIPPLE_TX_OPERATION_RULE_H_INCLUDED 2 | #define RIPPLE_TX_OPERATION_RULE_H_INCLUDED 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ripple { 10 | 11 | class OperationRule { 12 | public: 13 | //for TableListSet 14 | static TER dealWithTableListSetRule(ApplyContext& ctx, const STTx& tx); 15 | //check field in update/delete/get is right 16 | static bool checkRuleFields(std::vector& vecFields,Json::Value condition); 17 | 18 | //for SqlStatement 19 | static TER dealWithSqlStatementRule(ApplyContext& ctx, const STTx& tx); 20 | 21 | static std::string getOperationRule(ApplyView& view, const STTx& tx); 22 | static bool hasOperationRule(ApplyView& view, const STTx& tx); 23 | 24 | static TER adjustInsertCount(ApplyContext& ctx, const STTx& tx, DatabaseCon* pConn); 25 | }; 26 | 27 | } // ripple 28 | #endif 29 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/android/override.txt: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Override printf, puts, putchar 4 | */ 5 | 6 | JNIEnv* jniEnv; 7 | 8 | void callOutputText(const char* text) { 9 | JNIEnv *env = jniEnv; 10 | 11 | jstring javaMsg = (*env)->NewStringUTF(env, text); 12 | (*env)->CallVoidMethod(env, activityObj, outputTextId, javaMsg); 13 | (*env)->DeleteLocalRef(env, javaMsg); 14 | } 15 | 16 | int printf(const char * format, ... ) 17 | { 18 | char buff[256] = {}; 19 | 20 | va_list args; 21 | va_start (args, format); 22 | const int result = vsnprintf(buff, sizeof(buff), format, args); 23 | va_end (args); 24 | 25 | if (result > 0) { 26 | callOutputText(buff); 27 | } 28 | return result; 29 | } 30 | 31 | int puts(const char *s) 32 | { 33 | callOutputText(s); 34 | callOutputText("\n"); 35 | return strlen(s); 36 | } 37 | 38 | int putchar(int c) 39 | { 40 | char buff[2] = { c, '\0' }; 41 | callOutputText(buff); 42 | return c; 43 | } 44 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/src/time.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void time_init(void) 5 | { 6 | int t; 7 | 8 | timer0_en_write(0); 9 | t = 2*SYSTEM_CLOCK_FREQUENCY; 10 | timer0_reload_write(t); 11 | timer0_load_write(t); 12 | timer0_en_write(1); 13 | } 14 | 15 | int elapsed(int *last_event, int period) 16 | { 17 | int t, dt; 18 | 19 | timer0_update_value_write(1); 20 | t = timer0_reload_read() - timer0_value_read(); 21 | if(period < 0) { 22 | *last_event = t; 23 | return 1; 24 | } 25 | dt = t - *last_event; 26 | if(dt < 0) 27 | dt += timer0_reload_read(); 28 | if((dt > period) || (dt < 0)) { 29 | *last_event = t; 30 | return 1; 31 | } else 32 | return 0; 33 | } 34 | 35 | void msleep(int ms) 36 | { 37 | timer0_en_write(0); 38 | timer0_reload_write(0); 39 | timer0_load_write(SYSTEM_CLOCK_FREQUENCY/1000*ms); 40 | timer0_en_write(1); 41 | timer0_update_value_write(1); 42 | while(timer0_value_read()) timer0_update_value_write(1); 43 | } 44 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/fomu/include/usb.h: -------------------------------------------------------------------------------- 1 | #ifndef __USB_H 2 | #define __USB_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | struct usb_setup_request; 11 | 12 | void usb_isr(void); 13 | void usb_init(void); 14 | void usb_connect(void); 15 | void usb_disconnect(void); 16 | 17 | int usb_irq_happened(void); 18 | void usb_setup(const struct usb_setup_request *setup); 19 | int usb_send(const void *data, int total_count); 20 | void usb_ack_in(void); 21 | void usb_ack_out(void); 22 | void usb_err_in(void); 23 | void usb_err_out(void); 24 | int usb_recv(void *buffer, unsigned int buffer_len); 25 | void usb_poll(void); 26 | int usb_wait_for_send_done(void); 27 | void usb_recv_done(void); 28 | void usb_set_address(uint8_t new_address); 29 | 30 | void usb_putc(char c); 31 | int usb_getc(void); 32 | int usb_write(const char *buf, int count); 33 | int usb_can_getc(void); 34 | int usb_can_putc(void); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/test/lang/README.md: -------------------------------------------------------------------------------- 1 | # Performance 2 | 3 | ```log 4 | Function: fib(40) 5 | ----------------------------------------------------- 6 | Device: Lenovo Ideapad 720s [i5-8250U @ 1.60GHz] 7 | ----------------------------------------------------- 8 | Linux x64 gcc 7.4.0 4.63s 9 | Linux x64 clang 9 5.32s 10 | Win 10 x64 clang 9 5.35s 11 | Win 10 x64 msvc 2019 6.10s 12 | Win 10 x86 clang 9.43s - no TCO 13 | Linux x86 gcc 11.34s 14 | Linux x86 clang 15.37s - no TCO 15 | ``` 16 | 17 | ## Running 18 | 19 | ```sh 20 | # WAC 21 | time $(ENGINES_PATH)/wac/wac fib32.wasm fib 40 22 | 23 | # WAMR 24 | time $(ENGINES_PATH)/wasm-micro-runtime/core/iwasm/products/linux/build/iwasm -f fib fib32.wasm 40 25 | 26 | # Wasmer 27 | time wasmer run --em-entrypoint fib fib32.wasm -- 40 28 | 29 | # WAVM 30 | time $(ENGINES_PATH)/wasm-jit-prototype/_build/bin/wavm run -f fib fib32.wasm 40 31 | ``` 32 | -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/embedded/esp32-idf/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(idf_ver "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}") 2 | 3 | if (NOT CMAKE_BUILD_EARLY_EXPANSION) 4 | idf_build_get_property(build_dir BUILD_DIR) 5 | add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../../../../source ${build_dir}/m3) 6 | endif() 7 | 8 | set(APP_SOURCES "main.cpp") 9 | 10 | idf_component_register(SRCS ${APP_SOURCES} 11 | INCLUDE_DIRS "" 12 | LDFRAGMENTS linker.lf) 13 | 14 | if (idf_ver STREQUAL "4.0") 15 | # IDF v4.0 links apps with -nostdlib, so need to explicitly list the dependencies. 16 | 17 | add_library(m3_deps INTERFACE) 18 | target_link_libraries(m3_deps INTERFACE c m gcc) 19 | target_link_libraries(${COMPONENT_TARGET} PRIVATE m3 m3_deps) 20 | else() 21 | # For IDF v4.1 and later, no tricks required. 22 | 23 | target_link_libraries(${COMPONENT_TARGET} PRIVATE m3) 24 | endif() 25 | 26 | target_compile_options(m3 PUBLIC -DM3_IN_IRAM -DESP32 -O3 -freorder-blocks) 27 | -------------------------------------------------------------------------------- /bin/ci/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o xtrace 4 | set -o errexit 5 | 6 | # The build system. Either 'Unix Makefiles' or 'Ninja'. 7 | GENERATOR=${GENERATOR:-Unix Makefiles} 8 | # The compiler. Either 'gcc' or 'clang'. 9 | COMPILER=${COMPILER:-gcc} 10 | # The build type. Either 'Debug' or 'Release'. 11 | BUILD_TYPE=${BUILD_TYPE:-Debug} 12 | # Additional arguments to CMake. 13 | # We use the `-` substitution here instead of `:-` so that callers can erase 14 | # the default by setting `$CMAKE_ARGS` to the empty string. 15 | CMAKE_ARGS=${CMAKE_ARGS-'-Dwerr=ON'} 16 | 17 | # https://gitlab.kitware.com/cmake/cmake/issues/18865 18 | CMAKE_ARGS="-DBoost_NO_BOOST_CMAKE=ON ${CMAKE_ARGS}" 19 | 20 | if [[ ${COMPILER} == 'gcc' ]]; then 21 | export CC='gcc' 22 | export CXX='g++' 23 | elif [[ ${COMPILER} == 'clang' ]]; then 24 | export CC='clang' 25 | export CXX='clang++' 26 | fi 27 | 28 | mkdir build 29 | cd build 30 | cmake -G "${GENERATOR}" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${CMAKE_ARGS} .. 31 | cmake --build . -- -j $(nproc) 32 | -------------------------------------------------------------------------------- /src/intx/README.md: -------------------------------------------------------------------------------- 1 | # intx 2 | 3 | [![readme style: standard][readme style standard badge]][standard readme] 4 | 5 | > Extended precision integer C++ library 6 | 7 | Provides following types: 8 | 9 | - `uint128` (standalone module [int128.hpp]), 10 | - `uint256`, 11 | - `uint512`. 12 | 13 | ## Usage 14 | 15 | To build, test or benchmark. 16 | 17 | ```bash 18 | git clone https://github.com/chfast/intx 19 | cd intx 20 | mkdir build 21 | cd build 22 | 23 | cmake .. 24 | cmake --build . -- -j 25 | 26 | test/intx-unittests 27 | test/intx-bench 28 | ``` 29 | 30 | ## Maintainer 31 | 32 | Paweł Bylica [@chfast] 33 | 34 | ## License 35 | 36 | Licensed under the [Apache License, Version 2.0]. 37 | 38 | 39 | [@chfast]: https://github.com/chfast 40 | [Apache License, Version 2.0]: LICENSE 41 | [int128.hpp]: include/intx/int128.hpp 42 | [standard readme]: https://github.com/RichardLitt/standard-readme 43 | 44 | [readme style standard badge]: https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square 45 | 46 | -------------------------------------------------------------------------------- /Builds/containers/gitlab-ci/build_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -ex 3 | pkgtype=$1 4 | if [ "${pkgtype}" = "rpm" ] ; then 5 | container_name="${RPM_CONTAINER_NAME}" 6 | elif [ "${pkgtype}" = "dpkg" ] ; then 7 | container_name="${DPKG_CONTAINER_NAME}" 8 | else 9 | echo "invalid package type" 10 | exit 1 11 | fi 12 | 13 | if docker pull "${ARTIFACTORY_HUB}/${container_name}:latest_${CI_COMMIT_REF_SLUG}"; then 14 | echo "found container for latest - using as cache." 15 | docker tag \ 16 | "${ARTIFACTORY_HUB}/${container_name}:latest_${CI_COMMIT_REF_SLUG}" \ 17 | "${container_name}:latest_${CI_COMMIT_REF_SLUG}" 18 | CMAKE_EXTRA="-D${pkgtype}_cache_from=${container_name}:latest_${CI_COMMIT_REF_SLUG}" 19 | fi 20 | 21 | cmake --version 22 | test -d build && rm -rf build 23 | mkdir -p build/container && cd build/container 24 | eval time \ 25 | cmake -Dpackages_only=ON -DCMAKE_VERBOSE_MAKEFILE=ON ${CMAKE_EXTRA} \ 26 | -G Ninja ../.. 27 | time cmake --build . --target "${pkgtype}_container" -- -v 28 | 29 | -------------------------------------------------------------------------------- /src/intx/test/benchmarks/bench_builtins.cpp: -------------------------------------------------------------------------------- 1 | // intx: extended precision integer library. 2 | // Copyright 2019 Pawel Bylica. 3 | // Licensed under the Apache License, Version 2.0. 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | template 11 | static void clz(benchmark::State& state) 12 | { 13 | constexpr int input_size = 1000; 14 | std::array inputs{}; 15 | for (size_t i = 0; i < inputs.size(); ++i) 16 | { 17 | const auto s = i % 65; 18 | inputs[i] = s == 64 ? 0 : (uint64_t{1} << 63) >> s; 19 | } 20 | 21 | for (auto _ : state) 22 | { 23 | for (auto& in : inputs) 24 | in = ClzFn(static_cast(in)); 25 | } 26 | benchmark::DoNotOptimize(inputs.data()); 27 | } 28 | BENCHMARK_TEMPLATE(clz, uint32_t, intx::clz); 29 | BENCHMARK_TEMPLATE(clz, uint32_t, intx::clz_generic); 30 | BENCHMARK_TEMPLATE(clz, uint64_t, intx::clz); 31 | BENCHMARK_TEMPLATE(clz, uint64_t, intx::clz_generic); 32 | -------------------------------------------------------------------------------- /src/ripple/shamap/LeafNodeHashCache.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef RIPPLE_SHAMAP_LEAFNODEHASHCACHE_H_INCLUDED 3 | #define RIPPLE_SHAMAP_LEAFNODEHASHCACHE_H_INCLUDED 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ripple { 11 | 12 | namespace detail { 13 | class LeafNodeHashCache 14 | { 15 | std::set mSet; 16 | std::recursive_mutex mutable m_mutex; 17 | 18 | public: 19 | void 20 | insert(uint256 hash) 21 | { 22 | std::lock_guard lock(m_mutex); 23 | mSet.insert(hash); 24 | } 25 | 26 | bool 27 | exist(uint256 hash) 28 | { 29 | std::lock_guard lock(m_mutex); 30 | return mSet.find(hash) != mSet.end(); 31 | } 32 | 33 | size_t 34 | size() 35 | { 36 | std::lock_guard lock(m_mutex); 37 | return mSet.size(); 38 | } 39 | 40 | void 41 | clear() 42 | { 43 | std::lock_guard lock(m_mutex); 44 | mSet.clear(); 45 | } 46 | }; 47 | } 48 | } // namespace ripple 49 | 50 | #endif -------------------------------------------------------------------------------- /src/wasmvm/wasm3/platforms/ios/wasm3/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // wasm3 4 | // 5 | // Created by Volodymyr Shymanskyy on 1/10/20. 6 | // Copyright © 2020 wasm3. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | var gLog: UITextView! 12 | 13 | class ViewController: UIViewController { 14 | 15 | // MARK: Properties 16 | @IBOutlet var log: UITextView! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | 21 | gLog = log 22 | 23 | redirect_output({ 24 | if let ptr = $0 { 25 | let data = Data(bytes: ptr, count: Int($1)) 26 | if let str = String(data: data, encoding: String.Encoding.utf8) { 27 | DispatchQueue.main.async { 28 | gLog.text += str 29 | } 30 | } 31 | } 32 | }) 33 | 34 | run_app() 35 | } 36 | 37 | override func didReceiveMemoryWarning() { 38 | super.didReceiveMemoryWarning() 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /Builds/containers/packaging/dpkg/debian/rippled.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | USER_NAME=rippled 5 | GROUP_NAME=rippled 6 | case "$1" in 7 | configure) 8 | id -u $USER_NAME >/dev/null 2>&1 || \ 9 | adduser --system --quiet \ 10 | --home /nonexistent --no-create-home \ 11 | --disabled-password \ 12 | --group "$GROUP_NAME" 13 | chown -R $USER_NAME:$GROUP_NAME /var/log/rippled/ 14 | chown -R $USER_NAME:$GROUP_NAME /var/lib/rippled/ 15 | chown -R $USER_NAME:$GROUP_NAME /opt/ripple 16 | chmod 755 /var/log/rippled/ 17 | chmod 755 /var/lib/rippled/ 18 | chmod 644 /opt/ripple/etc/update-rippled-cron 19 | chmod 644 /etc/logrotate.d/rippled 20 | chown -R root:$GROUP_NAME /opt/ripple/etc/update-rippled-cron 21 | ;; 22 | 23 | abort-upgrade|abort-remove|abort-deconfigure) 24 | ;; 25 | 26 | *) 27 | echo "postinst called with unknown argument \`$1'" >&2 28 | exit 1 29 | ;; 30 | esac 31 | 32 | 33 | #DEBHELPER# 34 | 35 | exit 0 36 | -------------------------------------------------------------------------------- /bin/ci/ubuntu/travis-cache-start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # some cached files create churn, so save them here for 3 | # later restoration before packing the cache 4 | set -eux 5 | pushd ${TRAVIS_HOME} 6 | if [ -f cache_ignore.tar ] ; then 7 | rm -f cache_ignore.tar 8 | fi 9 | 10 | if [ -d _cache/nih_c ] ; then 11 | find _cache/nih_c -name "build.ninja" | tar rf cache_ignore.tar --files-from - 12 | find _cache/nih_c -name ".ninja_deps" | tar rf cache_ignore.tar --files-from - 13 | find _cache/nih_c -name ".ninja_log" | tar rf cache_ignore.tar --files-from - 14 | find _cache/nih_c -name "*.log" | tar rf cache_ignore.tar --files-from - 15 | find _cache/nih_c -name "*.tlog" | tar rf cache_ignore.tar --files-from - 16 | # show .a files in the cache, for sanity checking 17 | find _cache/nih_c -name "*.a" -ls 18 | fi 19 | 20 | if [ -d _cache/ccache ] ; then 21 | find _cache/ccache -name "stats" | tar rf cache_ignore.tar --files-from - 22 | fi 23 | 24 | if [ -f cache_ignore.tar ] ; then 25 | tar -tf cache_ignore.tar 26 | fi 27 | popd 28 | 29 | 30 | -------------------------------------------------------------------------------- /Builds/CMake/RippledValidatorKeys.cmake: -------------------------------------------------------------------------------- 1 | option (validator_keys "Enables building of validator-keys-tool as a separate target (imported via FetchContent)" OFF) 2 | 3 | if (validator_keys AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.11) 4 | git_branch (current_branch) 5 | # default to tracking VK develop branch unless we are on master/release 6 | if (NOT (current_branch STREQUAL "master" OR current_branch STREQUAL "release")) 7 | set (current_branch "develop") 8 | endif () 9 | message (STATUS "tracking ValidatorKeys branch: ${current_branch}") 10 | 11 | FetchContent_Declare ( 12 | validator_keys_src 13 | GIT_REPOSITORY https://github.com/ripple/validator-keys-tool.git 14 | GIT_TAG "${current_branch}" 15 | ) 16 | FetchContent_GetProperties (validator_keys_src) 17 | if (NOT validator_keys_src_POPULATED) 18 | message (STATUS "Pausing to download ValidatorKeys...") 19 | FetchContent_Populate (validator_keys_src) 20 | endif () 21 | add_subdirectory (${validator_keys_src_SOURCE_DIR} ${CMAKE_BINARY_DIR}/validator-keys) 22 | endif () 23 | 24 | 25 | --------------------------------------------------------------------------------