Skip to content

Commit 38eeded

Browse files
authored
Merge pull request #194 from ewasm/wasm-lowercase
use Wasm, not WASM
2 parents d0a8e11 + 70406b1 commit 38eeded

8 files changed

+22
-22
lines changed

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ This repository contains documents describing the design and high-level overview
1313
Please review the [WebAssembly](http://webassembly.org/) [design](http://webassembly.org/docs/high-level-goals/) and [instruction set](https://webassembly.github.io/spec/core/appendix/index-instructions.html#index-instr) first. (You can also make a pull request or raise an issue at the [Wasm Github repo](https://github.com/WebAssembly/design).)
1414

1515
A few key points:
16-
* WebAssembly defines an instruction set, intermediate source format (WAST) and a binary encoded format (WASM).
16+
* WebAssembly defines an instruction set, intermediate source format (wast) and a binary encoded format (wasm).
1717
* WebAssembly has a few higher level features, such as the ability to import and execute outside methods defined via an interface.
18-
* [LLVM](https://llvm.org/) includes a WebAssembly backend to generate WASM output.
18+
* [LLVM](https://llvm.org/) includes a WebAssembly backend to generate Wasm output.
1919
* Major browser JavaScript engines will notably have native support for
2020
WebAssembly, including but not limited to: Google's
2121
[V8](https://github.com/v8/v8) engine (Node.js and Chromium-based browsers),
@@ -32,7 +32,7 @@ A few key points:
3232

3333
## What is Ethereum flavored WebAssembly (ewasm)?
3434

35-
ewasm is a restricted subset of WASM to be used for contracts in Ethereum.
35+
ewasm is a restricted subset of Wasm to be used for contracts in Ethereum.
3636

3737
ewasm:
3838
* specifies the [VM semantics](./vm_semantics.md)

Diff for: backwards_compatibility.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ cost. The fee schedule for ewasm is yet to be specified.
1414
## Identification of code
1515
We assume there is some sort of code handler function that all clients have
1616
implemented. The code handler identifies the instruction set type by whether it
17-
starts with WASM's magic number or not.
17+
starts with Wasm's magic number or not.
1818

19-
The WASM magic number is the following byte sequence: `0x00, 0x61, 0x73, 0x6d`.
19+
The Wasm magic number is the following byte sequence: `0x00, 0x61, 0x73, 0x6d`.
2020

2121
## Solidity
2222
Support of compiling to ewasm can be accomplished by adding a new backend to

Diff for: comparison.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# WASM
1+
# Wasm
22
### Good
33
* limited well defined non-determinism
44
* performant (near native speed)
@@ -21,7 +21,7 @@
2121
* not stable
2222
* large surface (ISA) that VM implementors would have to deal with
2323

24-
Response from Derek Schuff (one of the engineers for PNaCl) from Google on WASM vs LLVM
24+
Response from Derek Schuff (one of the engineers for PNaCl) from Google on Wasm vs LLVM
2525

2626
>I'm guessing you are unfamiliar with PNaCl. This is more or less the approach taken by PNaCl; i.e. use LLVM as the starting point for a wire format. It turns out that LLVM IR/bitcode by itself is neither portable nor stable enough to be used for this purpose, and it is designed for compiler optimizations, it has a huge surface area, much more than is needed for this purpose. PNaCl solves these problems by defining a portable target triple (an architecture called "le32" used instead of e.g. i386 or arm), a subset of LLVM IR, and a stable frozen wire format based on LLVM's bitcode. So this approach (while not as simple as "use LLVM-IR directly") does work. However LLVM's IR and bitcode formats were designed (respectively) for use as a compiler IR and for temporary file serialization for link-time optimization. They were not designed for the goals we have, in particular a small compressed distribution format and fast decoding. We think we can do much better for wasm, with the experience we've gained from PNaCl
2727

Diff for: contract_interface.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Ewasm Contract Interface (ECI) specifies the structure of a contract module.
44

55
### Wire format
66

7-
Every contract must be stored in the [WebAssembly Binary Encoding](https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md) format (in short, WASM bytecode).
7+
Every contract must be stored in the [WebAssembly Binary Encoding](https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md) format (in short, Wasm bytecode).
88

99
### Imports
1010

Diff for: determining_wasm_gas_costs.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The goal of this document is to describe the process of determining gas costs
44
for ewasm instructions.
55

6-
Each WASM opcode is assigned an appropriate Intel IA-32 (x86) opcode (or a
6+
Each Wasm opcode is assigned an appropriate Intel IA-32 (x86) opcode (or a
77
series of opcodes). These opcodes have a fixed cycle count (called *latency*
88
by Intel). We are selecting one specific CPU model from the Haswell architecture
99
(family: `06`, model `3C`). This equals to CPUs produced in 2014.
@@ -35,13 +35,13 @@ by the *metering injection contract*.
3535
## Gas vs. *Particles*
3636

3737
The current gas handling fields do not offer the precision needed assuming that
38-
running WASM opcodes takes significantly less processing power compared to EVM1
38+
running Wasm opcodes takes significantly less processing power compared to EVM1
3939
opcodes.
4040

41-
*Rationale*: EVM1 opcodes operate on 256-bits of data, while WASM opcodes are limited
41+
*Rationale*: EVM1 opcodes operate on 256-bits of data, while Wasm opcodes are limited
4242
to at most 64-bits, which results in executing four instructions in the best
4343
case to match EVM1. Most arithmetic instructions in EVM1 cost 3 gas, which would
44-
amount to 0.75 gas for most 64-bit WASM instructions.
44+
amount to 0.75 gas for most 64-bit Wasm instructions.
4545

4646
Internally, ewasm gas measurements should be recorded in a 64 bit variable
4747
with 4 decimal digits precision. We call this *particles*. It is a minor

Diff for: faq.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# FAQ
22

3-
WASM's FAQ can be found [here](https://github.com/WebAssembly/design/blob/master/FAQ.md)
3+
Wasm's FAQ can be found [here](https://github.com/WebAssembly/design/blob/master/FAQ.md)
44

55
## Is ewasm primarily the replacement for EVM?
6-
Currently it is being researched as a replacement instruction set for EVM1. Other instruction sets have been considered but so far WASM seems the most suitable.
6+
Currently it is being researched as a replacement instruction set for EVM1. Other instruction sets have been considered but so far Wasm seems the most suitable.
77

8-
## What are alternatives to WASM?
8+
## What are alternatives to Wasm?
99
Some that have been considered are [here](./comparison.md)
1010

1111
## What are the benefits?
@@ -23,10 +23,10 @@ Not off the bat, a transcompiler will have to be created to compile existing EVM
2323
## How does ewasm handle non-determinism when a variety of programming languages are allowed to be used?
2424
Part of the project goal is to eliminate nasal-demons. It's in the MVP. There are still a couple of edge case like sign values on NaNs but they can be canonicalized by AST transforms.
2525

26-
## Will ewasm be compatible with WASM?
27-
Yes, the Ethereum System Interface can also be written in WASM.
26+
## Will ewasm be compatible with Wasm?
27+
Yes, the Ethereum System Interface can also be written in Wasm.
2828

29-
## Can ewasm be built even if WASM is not currently complete or will we need to wait for its completion/MVP?
29+
## Can ewasm be built even if Wasm is not currently complete or will we need to wait for its completion/MVP?
3030
Yes, but we would lose the "Shared tooling" benefit. So It might not make sense.
3131

3232
## Does ewasm use synchronous or asynchronous methods?

Diff for: metering.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Given a set of operations and a corresponding set of costs for each operation we can deterministically run computation for any number of cost units by summing up the costs on the execution of each operation. We call the cost units here "gas" and it stands as a estimation for computational time.
44

5-
## Metering in WASM
5+
## Metering in Wasm
66

77
The following has been implemented [here](https://github.com/ewasm/wasm-metering)
88

@@ -25,7 +25,7 @@ i64.const <cost>
2525
call $meter
2626
```
2727

28-
And a metering function `$meter`. The meter function has a signature of `(type (func (param i64)))`. Internally this function should keep a running sum and if that sum grows larger than a given threshold, end the program's execution. The metering function can be imbedded in the binary itself or can use wasm's import to define it externally.
28+
And a metering function `$meter`. The meter function has a signature of `(type (func (param i64)))`. Internally this function should keep a running sum and if that sum grows larger than a given threshold, end the program's execution. The metering function can be embedded in the binary itself or can use wasm's import to define it externally.
2929

3030
Then given an array of opcodes we iterate the array and divided into segments that start with one of the `branching_ops`
3131

Diff for: rationale.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* Fast & Efficient: To truly distinguish Ethereum as the World Computer we need to have a very performant VM. The current architecture of the VM is one of the greatest blockers to raw performance. WebAssembly aims to execute at near native speed by taking advantage of common hardware capabilities available on a wide range of platforms. This will open the door to a wide array of uses that require performance/throughput.
44
* Security: With the add performance gains from ewasm we will be able to implement parts of Ethereum such as the precompiled contract in the VM itself which will minimize our trusted computing base.
55
* Standardized Instruction Set: WebAssembly is currently being designed as an open standard by a W3C Community Group and is actively being developed by engineers from Mozilla, Google, Microsoft, and Apple.
6-
* Toolchain Compatibility: A LLVM front-end for WASM is part of the MVP. This will allow developers to write contracts and reuse applications written in common languages such as C/C++, go and rust.
7-
* Portability: WASM is targeted to be deployed in all the major web browsers which will result in it being one of the most widely deployed VM architecture. Contracts compiled to ewasm will share compatibility with any standard WASM environment. Which will make running a program either directly on Ethereum, on a cloud hosting environment, or on one's local machine - a frictionless process.
6+
* Toolchain Compatibility: A LLVM front-end for Wasm is part of the MVP. This will allow developers to write contracts and reuse applications written in common languages such as C/C++, go and rust.
7+
* Portability: Wasm is targeted to be deployed in all the major web browsers which will result in it being one of the most widely deployed VM architecture. Contracts compiled to ewasm will share compatibility with any standard Wasm environment. Which will make running a program either directly on Ethereum, on a cloud hosting environment, or on one's local machine - a frictionless process.
88
* Optional And Flexible Metering: Metering the VM adds overhead but is essential for running untrusted code. If code is trusted then metering maybe optional. ewasm defines metering as an optional layer to accommodate for these use cases.
99
* Furthermore some of [Wasm's top design goals](https://github.com/WebAssembly/design/blob/master/HighLevelGoals.md) are largely applicable to Ethereum, including:
1010

0 commit comments

Comments
 (0)