diff --git a/book/src/developer_guide/architecture.md b/book/src/developer_guide/architecture.md index 62cbb08c..6f3586f7 100644 --- a/book/src/developer_guide/architecture.md +++ b/book/src/developer_guide/architecture.md @@ -45,7 +45,7 @@ Unlike with the EVM, where heap memory usage is gas metered, our heap size is st LLVM is a special non Rust dependency. We interface its builder interface via the [inkwell](https://crates.io/crates/inkwell) wrapper crate. -We use upstream LLVM, but release and use our custom builds. We require the compiler builtins specifically built for the PVM rv64e target and always leave assertions on. Furthermore, we need cross builds because `resolc` itself targets emscripten and musl. The [revive-llvm-builer](https://crates.io/crates/revive-llvm-builder) functions as a cross-platform build script and is used to build and release the LLVM dependency. +We use upstream LLVM, but release and use our custom builds. We require the compiler builtins specifically built for the PVM `rv64emacb` target and always leave assertions on. Furthermore, we need cross builds because `resolc` itself targets emscripten and musl. The [revive-llvm-builer](https://crates.io/crates/revive-llvm-builder) functions as a cross-platform build script and is used to build and release the LLVM dependency. We also maintain the [lld-sys crate](https://crates.io/crates/lld-sys) for interfacing with `LLD`. The LLVM linker is used during the compilation process, but we don't want to distribute another binary. diff --git a/book/src/user_guide/cli.md b/book/src/user_guide/cli.md index de73a4ae..6241f0b3 100644 --- a/book/src/user_guide/cli.md +++ b/book/src/user_guide/cli.md @@ -21,7 +21,7 @@ Valid levels are the following: - `s`: Optimize for code size. - `z`: Aggressively optimize for code size. -By default, `-O3` is applied. +By default, `-Oz` is applied. ### Stack size ```bash @@ -31,11 +31,11 @@ By default, `-O3` is applied. PVM is a register machine with a traditional stack memory space for local variables. This controls the total amount of stack space the contract can use. You are incentivized to keep this value as small as possible: -1. Increasing the stack size will increase startup costs. +1. Increasing the stack size will increase gas costs due to increased startup costs. 2. The stack size contributes to the total memory size a contract can use, which includes the contract's code size. Default value: 32768 - + > [!WARNING] > > If the contract uses more stack memory than configured, it will compile fine but eventually revert execution at runtime! @@ -52,7 +52,7 @@ You are incentivized to keep this value as small as possible: 2.The heap size contributes to the total memory size a contract can use, which includes the contract's code size Default value: 65536 - + > [!WARNING] > > If the contract uses more heap memory than configured, it will compile fine but eventually revert execution at runtime! diff --git a/docs/404.html b/docs/404.html index f167935d..c8cef840 100644 --- a/docs/404.html +++ b/docs/404.html @@ -36,7 +36,7 @@ const path_to_root = ""; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "searchindex-756a6899.js"; + window.path_to_searchindex_js = "searchindex-82723808.js"; diff --git a/docs/developer_guide.html b/docs/developer_guide.html index 002eb782..0fbb2b06 100644 --- a/docs/developer_guide.html +++ b/docs/developer_guide.html @@ -35,7 +35,7 @@ const path_to_root = ""; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "searchindex-756a6899.js"; + window.path_to_searchindex_js = "searchindex-82723808.js"; diff --git a/docs/developer_guide/architecture.html b/docs/developer_guide/architecture.html index f150fc42..02b4a1de 100644 --- a/docs/developer_guide/architecture.html +++ b/docs/developer_guide/architecture.html @@ -35,7 +35,7 @@ const path_to_root = "../"; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "../searchindex-756a6899.js"; + window.path_to_searchindex_js = "../searchindex-82723808.js"; @@ -205,7 +205,7 @@
Unlike with the EVM, where heap memory usage is gas metered, our heap size is static (the size is user controllable via a setting flag). The compiler emits bound checks to prevent overflows.
LLVM is a special non Rust dependency. We interface its builder interface via the inkwell wrapper crate.
-We use upstream LLVM, but release and use our custom builds. We require the compiler builtins specifically built for the PVM rv64e target and always leave assertions on. Furthermore, we need cross builds because resolc itself targets emscripten and musl. The revive-llvm-builer functions as a cross-platform build script and is used to build and release the LLVM dependency.
We use upstream LLVM, but release and use our custom builds. We require the compiler builtins specifically built for the PVM rv64emacb target and always leave assertions on. Furthermore, we need cross builds because resolc itself targets emscripten and musl. The revive-llvm-builer functions as a cross-platform build script and is used to build and release the LLVM dependency.
We also maintain the lld-sys crate for interfacing with LLD. The LLVM linker is used during the compilation process, but we don’t want to distribute another binary.
At the moment, no significant custom optimizations are implemented. Thus, we are missing some optimization opportunities that neither solc nor LLVM can realize (due to their lack of domain specific knowledge about the semantics of our target environment). Furthermore, solc optimizes for EVM gas and a target machine orthogonal to our target (BE 256-bit stack machine EVM vs. 64-bit LE RISC architecture PVM). We have started working on an additional IR layer between Yul and LLVM to capture missed optimization opportunities, though.
--stack-size <STACK_SIZE>
PVM is a register machine with a traditional stack memory space for local variables. This controls the total amount of stack space the contract can use.
You are incentivized to keep this value as small as possible:
Default value: 32768
@@ -539,7 +539,7 @@Unlike with the EVM, where heap memory usage is gas metered, our heap size is static (the size is user controllable via a setting flag). The compiler emits bound checks to prevent overflows.
LLVM is a special non Rust dependency. We interface its builder interface via the inkwell wrapper crate.
-We use upstream LLVM, but release and use our custom builds. We require the compiler builtins specifically built for the PVM rv64e target and always leave assertions on. Furthermore, we need cross builds because resolc itself targets emscripten and musl. The revive-llvm-builer functions as a cross-platform build script and is used to build and release the LLVM dependency.
We use upstream LLVM, but release and use our custom builds. We require the compiler builtins specifically built for the PVM rv64emacb target and always leave assertions on. Furthermore, we need cross builds because resolc itself targets emscripten and musl. The revive-llvm-builer functions as a cross-platform build script and is used to build and release the LLVM dependency.
We also maintain the lld-sys crate for interfacing with LLD. The LLVM linker is used during the compilation process, but we don’t want to distribute another binary.
At the moment, no significant custom optimizations are implemented. Thus, we are missing some optimization opportunities that neither solc nor LLVM can realize (due to their lack of domain specific knowledge about the semantics of our target environment). Furthermore, solc optimizes for EVM gas and a target machine orthogonal to our target (BE 256-bit stack machine EVM vs. 64-bit LE RISC architecture PVM). We have started working on an additional IR layer between Yul and LLVM to capture missed optimization opportunities, though.
--stack-size <STACK_SIZE>
PVM is a register machine with a traditional stack memory space for local variables. This controls the total amount of stack space the contract can use.
You are incentivized to keep this value as small as possible:
Default value: 32768
diff --git a/docs/user_guide/differences.html b/docs/user_guide/differences.html index 91360c4a..33ee513d 100644 --- a/docs/user_guide/differences.html +++ b/docs/user_guide/differences.html @@ -35,7 +35,7 @@ const path_to_root = "../"; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "../searchindex-756a6899.js"; + window.path_to_searchindex_js = "../searchindex-82723808.js"; diff --git a/docs/user_guide/installation.html b/docs/user_guide/installation.html index 3dcc27ef..600593f3 100644 --- a/docs/user_guide/installation.html +++ b/docs/user_guide/installation.html @@ -35,7 +35,7 @@ const path_to_root = "../"; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "../searchindex-756a6899.js"; + window.path_to_searchindex_js = "../searchindex-82723808.js"; diff --git a/docs/user_guide/js.html b/docs/user_guide/js.html index 8f0d6222..a491dffe 100644 --- a/docs/user_guide/js.html +++ b/docs/user_guide/js.html @@ -35,7 +35,7 @@ const path_to_root = "../"; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "../searchindex-756a6899.js"; + window.path_to_searchindex_js = "../searchindex-82723808.js"; diff --git a/docs/user_guide/rust_libraries.html b/docs/user_guide/rust_libraries.html index 0d5cf3c4..08c7fbcf 100644 --- a/docs/user_guide/rust_libraries.html +++ b/docs/user_guide/rust_libraries.html @@ -35,7 +35,7 @@ const path_to_root = "../"; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "../searchindex-756a6899.js"; + window.path_to_searchindex_js = "../searchindex-82723808.js"; diff --git a/docs/user_guide/std_json.html b/docs/user_guide/std_json.html index 63b16d69..304e7c93 100644 --- a/docs/user_guide/std_json.html +++ b/docs/user_guide/std_json.html @@ -35,7 +35,7 @@ const path_to_root = "../"; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "../searchindex-756a6899.js"; + window.path_to_searchindex_js = "../searchindex-82723808.js"; diff --git a/docs/user_guide/tooling.html b/docs/user_guide/tooling.html index 8c115835..a6473556 100644 --- a/docs/user_guide/tooling.html +++ b/docs/user_guide/tooling.html @@ -35,7 +35,7 @@ const path_to_root = "../"; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "../searchindex-756a6899.js"; + window.path_to_searchindex_js = "../searchindex-82723808.js"; diff --git a/docs/welcome.html b/docs/welcome.html index db00e8b8..99cff778 100644 --- a/docs/welcome.html +++ b/docs/welcome.html @@ -35,7 +35,7 @@ const path_to_root = ""; const default_light_theme = "light"; const default_dark_theme = "navy"; - window.path_to_searchindex_js = "searchindex-756a6899.js"; + window.path_to_searchindex_js = "searchindex-82723808.js";